wpf

Where can I find Codesmith templates?

I am new to Codesmith. Are there any templates for Windows Forms and WPF? Please Help. ...

Databound project template Expression blend

What is Databound template in Expression Blend? ...

Splitting WPF ResourceDictionary

I have a WPF application made up of around seven user controls, each with a variety of different controls on each (textbox, combobox, radio button etc). Across the entire app I have applied a set of control styles take from the WPF Themes on CodePlex, however I have noticed a bit of a slowdown on the app since applying these styles. The...

WPF app has no "Pin to Taskbar" option

I have created a couple of WPF apps but when right clicking them in the Windows 7 Taskbar I just get a Close Windows Option, usually there is a Pin to Taskbar option, I don't know where this has gone, is there anything that needs to be enabled or anything. I am using: VS2010 + Blend 4 with .NET Framework 3.5SP1 ...

WPF DataGrid Add, Update and Delete using MVVM

I am looking for a sample code/Article which would demonstrate WPF DataGrid in action with MVVM pattern to add, updated and delete record from database. I have a specific requirement for allowing user to insert new record using DataGrid not a new child form. If anyone can recommend good resource or provide a sample for that particular ...

WPF: How to use DatePicker in XAML-DataGrid

In a standanlone WPF app I got a DataGrid to enter some values. For text values this works nicely just like this: <DataGrid AutoGenerateColumns="False" ItemsSource="{Binding MyCollection}"> <DataGrid.Columns> <DataGridTextColumn Header="Name" Binding="{Binding Name}"/> <DataGridTextColumn Header="Description" Binding="{Binding...

Using VerifyAccess and CheckAccess methods of DispatcherObject

While going through this article I came across this statement - If you are writing your own WPF objects, such as controls, all methods you use should call VerifyAccess before they perform any work. This guarantees that your objects are only used on the UI thread, like this //Using VerifyAccess and CheckAccess public clas...

How to check if given font family is a Composite font?

We can enumerate over the fonts available on system using Fonts.SystemFontFamilies. How can I distinguish between composite fonts and plain-font? How can I get the FontFamilies used in a composite font? I tried FontFamily.FamilyTypefaces, but it wasn't helpful. Thanks ...

DelegateCommand CanExecute not firing for UIControls placed in different region using Prism

Hi, I'm using WPF-Prism and I'm struggling with a DelegateCommand that is not activating a button that is situated in a different region (defined in Prism). Example: HomeTab module: I have a HomeTab module with a region for adding buttons (using Fluent ribbon) relative to the active application. Application module: I create a button vi...

Has .Net 4 ClickOnce made full trust XBAPs viable?

Here's my situation. I've just started a new job and I've inherited an application recently which is going to need a rewrite. I know what you're thinking but trust me,...this really IS one of those rare cases where the system I've got is beyond refactoring and almost everything has to go. The current app is a Silverlight 2.0 app with ...

Bind a Command to a Button inside a ListView with Caliburn.Micro

Hi, I'm trying to create something like a MDI tabbed Interface so I have a navigation pane (a Listbox) on the left, and a ContentPresenter on the right. I have a ShellViewModel that has a BindableCollection on it called AvailAbleScreens and I managed successfully to bind to that list with a ListViews DataTemplate: <ListView x:Name="Av...

Binding is not updated as expected

Hello, I'm building a simple UserControl, DoubleDatePicker, which defines a DependencyProperty, SelectedDate : DoubleDatePicker.xaml : <UserControl x:Class="TestWpfDoubleDatePicker.DoubleDatePicker" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:toolkit="h...

dispatcher timer for sending periodic data

Hi I want to send some kind of hearbeat at every configured time interval. I want to use dispatcher timer to send it. Main() { create dispatcher timer; } void dispacthertimertick() { // send heartbeat } How do i keep the main thread alive? Regards Raju ...

Binding WPF TreeView to Object

How to bind TreeView to the grouping collection ListCollectionView? code cs: ListCollectionView view=new ListCollectionView(Global._subjectCollection); view.GroupDescriptions.Add(new PropertyGroupDescription("Fund")); view.GroupDescriptions.Add(new PropertyGroupDescription("Cipher")); treeView1.ItemsSource = view.Groups; code XAML: ...

Overview of WPF controls

Hi, I am testing to style the wpf 4.0 controls in my application and can see how some controls contains others. For example is the Label control containing a TextBox control. Have you seen any good overview of how the different controls inherit each other to easier understand the impact on other controls when styling one control? /SP ...

Binding Grid Height Using FindAncestor and AncestorLevel To Another Grid

My question is with respect to properly binding the property of one element to another. Here is the structure of my code: (1) Data Template contains a grid (let's called the grid GridA), and in the grid, I specify an instance of a control, called ControlA. (2) ControlA is a UserControl that contains a Grid. There is custom logic in C...

Silverlight: Delay in Storyboard's Completed event handler

The storyBoard_Completed event is invoked in a delay of about half a second after the visual animation had finished. Would be glad for some more eyes to check out my Storyboard XAML: <Storyboard x:Key="blaAnimation" Completed="storyBoard_Completed"> <DoubleAnimationUsingKeyFrames Storyboard.TargetName="bla1" Storyboard.Targ...

How to update a part of a WPF custom style

Hi all, I have created a custom window control (inherited from Window), all is fine except the text of my status bar. I have added a new property to my control called "StatusText" and this text is shown inside a TextBlock in my control's style. But when I change the StatusText property of my window the text doesn't change, it's not upd...

Datagrid text alignment

I was wondering if anyone had an easy way to get the text in a WPF data grid to be center aligned. I got the data grid to work just fine, but the right text alignment bothered me. I goggled some, and downloaded the wpftoolkit, but the examples either do not work, or give me a compile error. I did add the reference to the wpftoolkit to my...

Mutually exclusive checkable menu items?

Given the following code: <MenuItem x:Name="MenuItem_Root" Header="Root"> <MenuItem x:Name="MenuItem_Item1" IsCheckable="True" Header="item1" /> <MenuItem x:Name="MenuItem_Item2" IsCheckable="True" Header="item2"/> <MenuItem x:Name="MenuItem_Item3" IsCheckable="True" Header="item3"/> </MenuItem> In XAML, is there a way to ...