How can I get the active screen dimensions?
What I am looking for is the equivalent of System.Windows.SystemParameters.WorkArea for the monitor that the window is currently on. Clairification: The window in question is WPF, not WinForms. ...
What I am looking for is the equivalent of System.Windows.SystemParameters.WorkArea for the monitor that the window is currently on. Clairification: The window in question is WPF, not WinForms. ...
The WPF control WindowsFormsHost inherits from IDisposable. If I have a complex WPF visual tree containing some of the above controls what event or method can I use to call IDispose during shutdown? ...
I've got some RadioButtons in my XAML... <StackPanel> <RadioButton Name="RadioButton1" GroupName="Buttons" Click="ButtonsChecked" IsChecked="True">One</RadioButton> <RadioButton Name="RadioButton2" GroupName="Buttons" Click="ButtonsChecked">Two</RadioButton> <RadioButton Name="RadioButton3" GroupName="Buttons" Click="Buttons...
I need some help with WPF binding syntax: public class ApplicationPresenter { public ObservableCollection<Quotes> PriceList {get;} } public class WebSitePricesView { private IApplicationPresenter presenter { get { return (ApplicationPresenter)DataContext; } } // public ObservableCollection<Quotes> PriceList ...
I am building a WPF application. Inside that application I am using the XmlReader class to parse several local XML files. The code I have written works perfectly during debugging, but fails once I publish the application and install it. I have the XML documents as CONTENT in build action, and I have them set to COPY ALWAYS.I can confirm...
I'm having some trouble understanding how command parameter binding works. When I create an instance of the widget class before the call to InitializeComponent it seems to work fine. Modifications to the parameter(Widget) in the ExecuteCommand function will be "applied" to _widget. This is the behavior I expected. If the instance o...
How can I bring my WPF application to the front of the desktop? So far I've tried: SwitchToThisWindow(new WindowInteropHelper(Application.Current.MainWindow).Handle, true); SetWindowPos(new WindowInteropHelper(Application.Current.MainWindow).Handle, IntPtr.Zero, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); SetForegroundWindow(new WindowInter...
hi there, i wonder if there is a way to access a control's templatepart from within c# for modifying the part (e.g. hiding, etc..). is it possible to get a reference to the part with pure c#? i don't want to touch the controls template. thanks j. ...
I have a window which overrides a RadioButton's ControlTemplate to show a custom control inside of it. Inside the custom control, I have a button's visibility tied to IsMouseOver, which works correctly in showing the button only when the mouse is hovering over the control. However, when I click on the RadioButton, the Button disappears. ...
I want to save and restore the window position of my WPF application. I want to make the code robust to use with multiple monitors who's number and relative location can change (I want to avoid opening my application off-screen when the monitor configuration has changed inbetween invocations). I know of the Screen class in System.Window...
Problem I've got a collection of IThings and I'd like to create a HierarchicalDataTemplate for a TreeView. The straightforward DataType={x:Type local:IThing} of course doesn't work, probably because the WPF creators didn't want to handle the possible ambiguities. Since this should handle IThings from different sources at the same time,...
It's easy to bind something to the SelectedIndex of the ListBox, but I want every item in the ListBox be able to bind to it's index in the list. Might sound weird, so here's what I'm trying to do: <DataTemplate x:Key="ScenarioItemTemplate"> <Border Margin="8,2,8,2" Background="#FF3C3B3B" BorderBr...
Hello All, I guess this is a multi-part question. I can import a 3D model into my WPF application but how do I apply an ambient occlusion shader effect to it? I know with .NET 3.5 SP1 you can do custom effects but that's limited to pixel shaders and doesn't include vertex shaders. I think i can do this with an XNA application but Im n...
WPF's view model oriented way of doing things makes it very tempting to just use business objects in the UI. Have you seen any issues with this? Why or why wouldn't you do this? ...
I want to assign a resource I already have a second name, similar to using the BasedOn property of Styles. Specifically I have a brush that I use for a group of elements called ForegroundColor and I would like to use it in a control template (a ComboBox) calling it MouseOverBackgroundBrush. I would like to do something like this: <Resou...
Hi, I'm not a designer, so I'm looking for some free WPF themes. Any suggestions? ...
What are the characteristics of a good UI designer? How much does one have to have graphical design abilities these days as opposed to interaction design abilities. I see this of growing importance with the advent of WPF and Silverlight. I personally consider myself good at interaction design, but would like to strengthen my skills in t...
I currently have two text boxes in which accept any number. I have text block that takes the two numbers entered and calculates the average. I was wondering if there was a way I could bind this text block to both text boxes and utilize a custom converter to calculate the average? I current am catching the text changed events on both text...
I have a TreeView bound to an XmlDataProvider. The name of a node is reflected in the tree and the data of the node is in a TextBox. When you click on a tree item, it loads the data in the TextBox. What is the best way to determine when a user has changed the source data referenced by the XmlDataProvider. I would like to put an aster...
Hi, We have a Navigation Based WPF application. It works fine when running directly from Visual Studio, or even if we copy the files to another directory or another computer and run it there. We deploy the application over the internet using ClickOnce and most of the time this does not cause any problems. Every now and then however, i...