tagged [wpf]

WPF Popup : open with animation

WPF Popup : open with animation I am using a wpf popup control. Here I have set popup animation property to slide. But when it opens, it doesn't animate. Do I have to add any other configur

21 Apr at 21:54

Design effects in WPF (tricks to enhance app's appearance)

Design effects in WPF (tricks to enhance app's appearance) I have developed an application that must be presented on exhibition as advertising. I want it to look more sexy! What tricks do you know tha...

5 Jul at 10:32

How do I make XAML DataGridColumns fill the entire DataGrid?

How do I make XAML DataGridColumns fill the entire DataGrid? I am using DataGrids in XAML (not Silverlight) with resizable columns, the DataGrid will expand if the user resizes the screen. Currently i...

1 Sep at 03:46

How to set x, y coordinates of WPF canvas children through code?

How to set x, y coordinates of WPF canvas children through code? How to set x, y coordinates of WPF canvas children through code? Below is my sample code. ``` Canvas root = new Canvas(); double y = 5;...

14 Jan at 17:57

How to open a child windows under parent window on menu item click in WPF?

How to open a child windows under parent window on menu item click in WPF? I am developing an application in C#. I'm using .Net under WPF. I want to open a new child window (like a dialog) and it shou...

How do I create a dashed border with rounded corners in WPF?

How do I create a dashed border with rounded corners in WPF? The `Rectangle` element has `StrokeDashArray` which allows it to be drawn with dashes, but it doesn't support rounded corners. The `Border`...

3 Feb at 08:55

Get Absolute Position of element within the window in wpf

Get Absolute Position of element within the window in wpf I would like to get the absolute position of an element in relation to the window/root element when it is double clicked. The element's relati...

16 Oct at 17:31

WPF - choose startup window based on some condition

WPF - choose startup window based on some condition When running my program by clicking `Run` or pressing `Ctrl + F5`, is it possible to open different windows based on some check condition? I.e if so...

13 Oct at 17:33

Simple (I think) Horizontal Line in WPF?

Simple (I think) Horizontal Line in WPF? Creating a relatively simple data entry form, and just want to separate certain sections with a horizontal line (not unlike an HR tag in HTML) that stretches t...

23 Jan at 23:4

Change the coordinate system of a Canvas in WPF

Change the coordinate system of a Canvas in WPF I'm writing a mapping app that uses a Canvas for positioning elements. For each element I have to programatically convert element's Lat/Long to the canv...

5 Aug at 00:47

The default value type does not match the type of the property

The default value type does not match the type of the property I have this class And this custrom control ``` public partial class ToothUI : UserControl { public ToothUI() { InitializeComponen...

5 Dec at 11:26

Programmatically generate keydown presses for WPF unit tests

Programmatically generate keydown presses for WPF unit tests I am trying to unit test a WPF control and need to simulate key down presses. I have seen a possible solution [here](https://stackoverflow....

22 Jul at 20:14

Creating a custom-shaped button with one rounded corner

Creating a custom-shaped button with one rounded corner I need to create a button in WPF that has a custom shape. Specifically, I want it to have rounded corners, like an ellipse. Here is a picture: !...

28 Jul at 06:41

Run vs. Content vs. Text in WPF

Run vs. Content vs. Text in WPF In a WPF (or even a Windows 8 or 8.1 application) you have three possible ways to add a text in a control. 1. Run element inside TextBlock element My text 2. Text pro...

20 Dec at 17:20

WPF ListViewItem item CheckBox. How to get all selected items?

WPF ListViewItem item CheckBox. How to get all selected items? I have a this code: ```

4 Nov at 17:10

WPF Checkbox style change

WPF Checkbox style change I have just started with WPF and need specific feature for a checkbox: 1. I want to change the shape from a box to a ellipse. 2. Futher more there should be a color change (g...

3 Dec at 13:33

Change Theme of .NET 4.5 WPF Ribbon

Change Theme of .NET 4.5 WPF Ribbon I am trying to change the theme of the new [WPF Ribbon Control](http://msdn.microsoft.com/en-us/library/system.windows.controls.ribbon.ribbon.aspx) from .NET Framew...

24 Sep at 14:33

How to make a Template Window in WPF?

How to make a Template Window in WPF? So i am building an application that will have lots of windows, all with the same basic layout: 1. A main Window 2. A logo in the top corner 3. A title block 4. A...

7 Jan at 14:42

BitmapSource from file

BitmapSource from file How can I load a `BitmapSource` from an image file?

28 Nov at 11:53

Ignore Alt+F4 in WPF Application

Ignore Alt+F4 in WPF Application How can I ignore + in WPF Application?

2 Aug at 12:48

Restart application using C#

Restart application using C# How can I restart my WPF application using C#?

21 May at 11:46

Add Scrollbars to a Textbox

Add Scrollbars to a Textbox How does one get scrollbars on a `TextBox`?

6 Feb at 00:28

Formatting text in a TextBlock

Formatting text in a TextBlock How do I achieve formatting of a text inside a `TextBlock` control in my WPF application? e.g.: I would like to have certain words in bold, others in italic, and some in...

27 Jun at 13:2

convert from Color to brush

convert from Color to brush How do I convert a `Color` to a `Brush` in C#?

6 Feb at 18:2

The difference between GotFocus and GotKeyboardFocus

The difference between GotFocus and GotKeyboardFocus What is the difference(s) between `GotFocus` and `GotKeyboardFocus` -and similarly `LostFocus` and `LostKeyboardFocus`? Sorry for the simple questi...

9 Aug at 19:58