What is the difference between a User Control Library and a Custom Control Library?

I am just coming up to speed on WPF and would like to create a reusable WPF control. When I look at the options for creating projects in Visual Studio, I see “WPF User Control Library” and “WPF Custom Control Library”. It’s unclear to me what the difference is between them and my Google searches … Read more

How to use WPF Background Worker

In my application I need to perform a series of initialization steps, these take 7-8 seconds to complete during which my UI becomes unresponsive. To resolve this I perform the initialization in a separate thread: public void Initialization() { Thread initThread = new Thread(new ThreadStart(InitializationThread)); initThread.Start(); } public void InitializationThread() { outputMessage(“Initializing…”); //DO INITIALIZATION outputMessage(“Initialization … Read more

wpf: how to show tooltip when button disabled by command?

I’m trying to show a tooltip regardless of a buttons state, but this does not seem to do the trick: <Button Command=”{Binding Path=CommandExecuteAction}” ToolTip=”{Binding Path=Description}” ToolTipService.ShowOnDisabled=”true” Style=”{StaticResource toolbarButton}”> <Image Source=”{Binding Path=Icon}”></Image> </Button> How can i show the tooltip when the button is disabled due to command.CanExecute returning false? Note: ToolTipService.ShowOnDisabled=”true” works like a charm. The … Read more

WPF User Control Parent

I have a user control that I load into a MainWindow at runtime. I cannot get a handle on the containing window from the UserControl. I have tried this.Parent, but it’s always null. Does anyone know how to get a handle to the containing window from a user control in WPF? Here is how the … Read more

WPF chart controls [closed]

Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Stack Overflow. Closed 8 years ago. Improve this question I am looking for a very simple WPF chart which should have a 2D graph and should have pan and zoom facilities . … Read more

Passing an enum value as command parameter from XAML

I want to pass an enum value as command parameter in WPF, using something like this: <Button x:Name=”uxSearchButton” Command=”{Binding Path=SearchMembersCommand}” CommandParameter=”SearchPageType.First” Content=”Search”> </Button> SearchPageType is an enum and this is to know from which button search command is invoked. Is this possible in WPF, or how can you pass an enum value as command parameter? … Read more

Any free WPF themes? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for … Read more