wpf

Any good WPF debuggers/inspectors out there for VS 2010?

I found Mole, which looks like exactly the thing I need, but alas there is no VS 2010 support. I'm not sure if the project is being maintained either. Are there other tools for live debugging/inspecting of a XAML control tree? I'm looking for something like firebug for XAML... ...

DependencyProperty dependencies and PropertyCallbacks

The heart of the question in this post is whether you can expect all DPs to be set by the time a Property callback for one of them is set. I ask this because this is not the behavior I am seeing. A class has two DP's, both of which are set in XAML, like so: <!-- Days of the Week --> <local:DayOfTheWeekColumn DowIndex="0" Acti...

How do you control the duration or speedratio parameters in a storyboard via a slider?

I created the following storyboad to continually rotate an image: <Storyboard x:Key="Rotate"> <DoubleAnimation Storyboard.TargetName="arrowRotate" Storyboard.TargetProperty="Angle" From="0.0" To="360.0" Duration="0:0:0.25" SpeedRatio="1" AutoReverse="False" RepeatB...

How to get access to Window from another thread?

var t = new Thread(new ParameterizedThreadStart(DoWork)); t.SetApartmentState(ApartmentState.STA); t.IsBackground = true; t.Start(App.Current.MainWindow); public static void DoWork(object owner) { var progressDlg = new ProgressBarDialog(); // progressDlg.Owner = (Window)owner; // This doesn't wor...

WPF DataGrid MouseOver on DataGridRow

I can't figure out why the first part of code isn't working, but the second is. PART 1 <DataGrid.RowStyle> <Style TargetType="DataGridRow"> <Style.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Setter Property="Background" ...

override style ignored by Generic.xaml

My generic.xaml code in the Assembly1: <Style x:Key="myLabelStyle" TargetType="{x:Type Label}"> <Setter Property="Foreground" Value="Red"/> <Setter Property="Content" Value="generic"/> </Style> <ControlTemplate x:Key="theButton" TargetType="{x:Type local:MyButton}"> <Grid Background="Beige"> <ContentPresenter/> ...

Overriding code behind layout changes by loading XAML file

I have a WPF app in which my client wants to be able to write a custom xml file to change the default layout set by an existing XAML file. What I am trying to do is fall back to the XAML layout if there are errors in the xml file I am parsing. I have the code behind done for parsing the xml file and changing the default layout but I'm tr...

Adding a Merged Dictionary to a Merged Dictionary

I can't seem to be able to add a merged dictionary to a collection of merged dictionaries within XAML. Theme.xaml <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="/Mine;component/Themes/Palette.Blue.xaml"/> <ResourceDictionary Source="/Mine;component/Themes/Template.xaml"/> </ResourceDictionary.MergedDiction...

Possible to make value converter accessible only by my user control? (WPF)

So I've gotten in the habit of using WPF/C# value converters because they are awesome. I usually just have a folder set up for value converters and then access them in whatever xaml files I might need them. I'm currently developing a user control that will have some value converters that I do not want other classes to be able to access....

How do I lock a WPF window so it can not be moved, resized,minimized, maximized or dragged

I am looking for a simple way to lock a WPF window. Is there a simple window style or property I can set on a WPF window to locked the window. By lock I mean the user can not move, resize, drag, minimize or maximize the window. If anyone has some source code or a project that does this please feel free to email the code at steve_44@inbox...

WPF DataGrid Binding and CheckBox

I have a fundamental question: Let's say I have a List of elements of some class. And I also have a DataGrid that displays the properties of the items of this list. I want a user to select some items via the extra checkbox column (datagridtemplatecolumn in fact). Then he presses the button and only selected items are processed by some f...

What aspects/practices of WPF could be most useful outside of WPF?

What aspects and practices specific to WPF could be most useful (and not inconceivable to implement) in non-WPF GUI programming? ...

Synchronous / blocking animations in WPF?

I desperately need synchronous / blocking Animations in C# / WPF (executing code in the completed event is unfortunately not enough in my case). I tried two ways: 1) Start the (asynchronous) animation using BeginAnimation with a Duration of x. Add Thread.Sleep(x) after the asynchronous call. However this doesn't work, the Animation is...

how to update WindowViewModel when there is a change in StatusBarViewModel

I have two ViewModels WindowViewModel & StatusBarViewModel. i want to updatethe property StatusBarVM in WindowViewModel when there is a change in StatusBarViewModel instance Following is the property in WindowViewModel public StatusBarViewModel StatusBarVM ...

How to implement substring search / filter in WPF Listbox with highlighting ?

Folks, I am writing a small WPF Windows App which has a listbox bound to Task type objects. I need to be able to search and narrow down the list of Tasks by TaskName. Narrowing down the selection isn't the problem, but bolding the matching characters you typed to narrow down the selection is. For an example if I got tasks "Party" and "P...

Loaded event of a WPF user control fire two times

Hi, To implement tab based environment in WPF we need to convert our WPF form to user control to accomplish tab based environment, however when doing this, loaded event of user control is called two times. While searching on the internet other people also pointed this issue. How can we ensure that loaded event is called only one time,...

WPF DataTrigger on any data (binding) change

Hi, I want to begin a storyboard, every time my Image source changes. I have implemented INotifyPropertyChanged. Can anyone help me achieve this? Thanks, <Image Name="pic" HorizontalAlignment="Center" VerticalAlignment="Center" Source="{Binding ElementName=uc, Path=Image}"> <Image.Resources> <Storyboard x:Key="pic...

Where can i find the default style for a WPF DataGridRow

Hey Any idea where i could find the default style XAML for the WPF DataGridRow? The goal is to change the color of the row when you hover over it or select it. i dont like the ugly blue :) Thanks! ...

how to set focus to particular cell of WPF toolkit datagrid

I am using WPF toolkit provided DataGrid control to display product list along with its OpenStock, Description etc. In this DataGrid i have set OpenStock column to editable and rest are non-editable. What i want now when my this windows loads, I want to set keyboard focus to first cell of OpenStock column and if possible in edit mode. I ...

"Pause" a scrollbar (in ListBox/etc) from insert/add to ItemSource

Twitter's new UserStream function is awesome, but has one major downside - the noise gets noisier. With updates coming in realtime, often it is hard to read a tweet before the framework scrolls down the tweet out of sight. Ideally, I'd like to pause/stop automagic scrolling if the Listbox focus isn't at the very top, even if it resulted...