wpf Questions

2

As often happens with WPF, I'm probably going about things the wrong way, but I have the following situation: I would like to apply a style depending on a DataTrigger, but you can't change Style f...
Junette asked 10/9, 2014 at 6:21

3

I have ListView (virtualization is on by default), which ItemsSource is bound to ObservableCollection<Item> property. When data are populated (property is set and notification is rised) I se...
Quieten asked 11/7, 2016 at 9:14

9

Solved

Scenario: User clicks a button on the View This invokes a command on the ViewModel, DoProcessing How, and where does the Wait cursor get set, considering the responsibilitues of View and ViewMode...
Glop asked 12/4, 2012 at 6:52

5

Solved

This is more out of curiosity. I was studying that WPF applications are resolution independent. Does this means that we need not bother about the monitor resolution size? because being a windows ap...
Maus asked 10/9, 2013 at 7:55

5

Solved

Anybody have a good example how to deep clone a WPF object, preserving databindings? The marked answer is the first part. The second part is that you have to create an ExpressionConverter and i...
Commemoration asked 28/8, 2008 at 15:14

17

Given that you have a control that fires a command: <Button Command="New"/> Is there a way to prevent the command from being fired twice if the user double clicks on the command? EDIT: Wh...
Ginn asked 8/5, 2009 at 19:6

0

I want to achieve something similar to this question, i.e. I have a XAML element with IsEnabled = false, but want to specifically enable a child element. A comment in the linked SO article mentions...
Frankish asked 17/7, 2024 at 14:33

5

About a few days ago, we ran our WPF application, some of us(in several developer's computers) found very a lot controls has dashed border when they got focused, such as below: The outer control...
Buettner asked 16/9, 2013 at 10:39

7

Solved

I use LeadTools for scanning. I want to convert scanning image to byte. void twainSession_AcquirePage(object sender, TwainAcquirePageEventArgs e) { ScanImage = e.Image.Clone(); ImageSource sou...
Hays asked 8/11, 2014 at 6:17

4

Solved

I want to tell WPF: "If TextBlock contains no data, then don't show it." TRY #1 with a simple trigger produces the error "'Text' member is not valid because it does not have a qualifying type name...
Antagonist asked 8/6, 2009 at 14:56

9

Solved

I'd like to know what's the best way (read most elegant) to have a single instance of a given Window per application in WPF. I'm a newcomer to .NET and WPF and what I came up with looks pretty lam...
Philbo asked 20/10, 2010 at 23:30

11

Solved

I set the min height of a datagrid that way: <DataGrid MinRowHeight="40"> After feeding the datagrid with datas, the text in each cell is top and left aligned. I could not find an easy way...
Cristobal asked 20/5, 2011 at 12:47

2

Solved

First, the standard info: VS2010 Ultimate Win7 Ultimate x64 WPF app The WPF context menu: <ContextMenu x:Key="RightClickSystemTray" Placement="MousePoint"> <MenuItem Header="Exit" Cli...
Gouty asked 4/4, 2011 at 3:9

2

Solved

In my dictionary file I have <Style TargetType="{x:Type Label}" BasedOn="{StaticResource {x:Type Label}}"> <Setter Property="Foreground" Value="White" /> <Setter Property="Backgro...
Pickett asked 15/9, 2014 at 23:30

9

Solved

I recently got into a strange problem, it seem to have happen randomly. When I make changes inside a XAML-file (It can be anything, change text in a button, change color of background etc.) my vi...
Agglutinative asked 1/2, 2014 at 22:30

6

Solved

The Main method is the entry point of a C# console application. Thus, for example, if I have to start some threads or services, I will do it within the Main method. I do not see the Main method in...
Catto asked 18/8, 2014 at 20:45

7

Solved

I have a weird error I'm trying to debug with no luck. I have subclassed hwndhost showing some content, I have the following function in that class to set to fullscreen: private void SetFullScre...
Functionary asked 23/2, 2011 at 9:52

13

Solved

I have a radio buttons group. The choice is not mandatory to fill the form. At the beginning all the radio buttons are unchecked. If the user unintentionally clicks on one of them, he can not go ba...
Osteoarthritis asked 22/9, 2015 at 14:38

7

Solved

I am trying to load a certificate from a pfx file in a WPF application and it gives me an access denied error. using (FileStream stream = System.IO.File.OpenRead(certificatePath)) { using (Binar...
Otisotitis asked 23/6, 2016 at 17:50

8

Solved

My WPF ComboBox contains only text entries. The user will select one. What is the simplest way to get the text of the selected ComboBoxItem? Please answer in both C# and Visual Basic. Here is my Co...
Swellhead asked 15/9, 2010 at 20:13

6

Is it possible to remove the white strip on top of WPF window with Window Style=None. XAML and Window is shown in the screenshot:
wpf
Aleurone asked 14/4, 2016 at 18:28

6

Solved

I have a simple WPF application with a menu. I need to add menu items dynamically at runtime. When I simply create a new menu item, and add it onto its parent MenuItem, it does not display in the m...
Kassab asked 14/11, 2008 at 21:35

4

Solved

So i basically have this ListView and i would like to press Tab and iterate through my TreeViewItems (preferrably only my TextBoxes) <ListView> <ListView.View> <GridView> <...
Nativity asked 11/8, 2011 at 1:25

3

Solved

When i load a xxxx.XAML into WPF frame it throws the error ' ', hexadecimal value 0x0C, is an invalid character. Line 1, position 1. how to find which is causing the problem. when the xxxx.XAML is ...
Liriodendron asked 16/1, 2013 at 6:39

6

I am using .NET Core 3.1 and want to create a GRPC Service with a Console App as the Server and a WPF App as the Client. I can't see any examples online - for some reason all the Console Apps seem ...
Constrained asked 29/9, 2020 at 16:1

© 2022 - 2025 — McMap. All rights reserved.