wpf

UserControl custom DependencyProperties problem

I have a custom UserControl with an image and a label, both of which are set at design-time in the XAML like so: <controls:HomeBarButton Icon="/SuCo;component/Resources/music.png" Text="music"/> When the control has just an Icon, it looks fine. When I add the Text property, the icon disappears at both design- and run-time and the text l...

WPF - Is this a fit? Composite WPF (Prism), multiple screens/controls & 3rd Party Controls (Docking, Ribbon)

Hi, I'm looking at using Composite WPF (Prism) for an application shell. I also like the WPF Syncfusion DockingManager and Ribbon Control - but the question is how do I get the Syncfusion controls to work with Composite WPF in a composite, multi-window application? The application I have in mind will have a shell application with a rib...

3d elements as items in a WPF ListBox

Hello, I'm wondering if anyone knows if it's possible in XAML to have a ListBox whose DataTemplate defines the ListBoxItem as a 3d element. Something along the lines of: <ListBox x:Name="lst3D" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> <ListBox.ItemTemplate> <DataTem...

Can not add rows to WPF DataGrid in PowerShell

I am using DataGrid from "WPF Toolkit" from PowerShell. The problem is that I can't add new rows using GUI. dialog.xaml <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:dg="clr-namespace:Micro...

Chaining VisualStates In Silverlight

I have three VisualStates that each have animation in them and I would like to chain them together. I want one state to begin after the last one has completed. How do I do this in Silverlight without a lot of smelly code? ...

wpf zIndex in TabControl

I am trying to get zIndexing working on a custom UserControl but it clips the bottom of the control when it pops up inside a TabControl as shown here. This is my XAML <StackPanel Panel.ZIndex="1"> <TabControl Name="TabCtrlMain" Panel.ZIndex="2"> <TabItem Name="TabItmOrdrLst" Visibility="Collapsed" Panel.ZIndex="3" > ...

Using WPF SplashScreen in .NET 3.5 WinForms

Can I use the built in WPF splash screen functionality in a WinForms project compiled under .NET 3.5 SP1 VS2008? ...

Reading metadata from images in WPF

I'm aware that WPF allows you to use images that require WIC codecs to view (for the sake of argument, say a digital camera RAW file); however I can only see that it lets you show the image natively, but I can't see anyway of getting at the meta-data (for example, the exposure time). It obviously can be done, as Windows Explorer shows i...

Blink tab header on receiving event

Hi, I have a tab based chat application, which a user can chat with several people in different tab items. I want to notify the user of incoming messages by blinking the tab header in case of the user is chatting with another user other than the tab which receives the message. How I can achieve this in WPF. Some example will be greatly ...

WPF: Limit number of characters in one row

I'd like to have "80 characters per line" setting for WPF RichTextBox control. Is there any nice way to do this? ...

how to Play .flv files in WPF?

How to Play .flv files in WPF? please anyone help me out. ...

DirectX application on 64 bit windows

I am developing a WPF application where the 3D part is handled by DirectX 9 (a lot of 3d that did not run fast enough using WPF). The problem is the application is released with "Any CPU" as configuration and when a user runs it on a 64 bit windows, the direcX part crashes (System.BadImageFormatException). Apparently the dlls included ...

DataGridComboBoxColumn is empty if text does not exit in the dropdown

I am using the WPF Toolkit DataGrid bound to Person collection. The LastName is represented by the ComboBox with wellknown names. <x:Array x:Key="knownLastNames" Type="sys:String"> <sys:String>Johnson</sys:String> <sys:String>Williams</sys:String> </x:Array> The problem is that if I set LastName to "Brown" (missed in knownLast...

ControlTemplate edit inside Resource hangs visual studio 2008

I am using Visual Studio 2008 SP1 in XP The hang up occurs when i try to edit a controltemplate that is defined in a resource. (all my resource files are merged through application.xaml) Googling this issue i found out that it is a known bug to microsoft, but i cant seem to find a hotfix or a good enough solution in order to do my wor...

PowerShell WPF DataGrid: Exception thrown commiting emtpy row

I get exception trying to commit empty DataGrid row. System.NullReferenceException: Object reference not set to an instance of an object. at MS.Internal.Data.PropertyPathWorker.DetermineWhetherDBNullIsValid() at MS.Internal.Data.PropertyPathWorker.get_IsDBNullValidForUpdate() at MS.Internal.Data.ClrBindingWorker.get_IsDBNullVal...

Delete an image bound to a control

I am writing an Image Manager WPF application. I have a ListBox with the following ItemsTemplate: <Grid x:Name="grid" Width="150" Height="150" Background="{x:Null}"> <Grid.RowDefinitions> <RowDefinition Height="*"/> <RowDefinition Height="27.45"/> </Grid.RowDefinitions> ...

How to hide Label or TextBlock inside a WPF Grid

I am trying to hide the TextBlock and Label which are placed inside a grid like so: <TextBlock Grid.Column="3" Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Hidden">Text inside TextBlock</TextBlock> <Label Grid.Column="4" Grid.Row="2" HorizontalAlignment="Center" Visibility="Hidden">Text inside Label</...

WPF GridViewRowPresenter in an ItemsControl

I'm just starting learning WPF and I'm trying to use a GridViewRowPresenter inside of an ItemsControl to essentially duplicate the functionality of a simple table in HTML. The ListView is not appropriate since it is interactive (which I don't want). I am binding to a generic List of objects of an unknown quantity. I have a List of a cus...

Using a Grid as an ItemsHost

I would like to use a Grid as an ItemsHost but none of the items appear in their bound (column, row) positions. How can I make this work? As a simple example: XAML <ItemsControl ItemsSource="{Binding DataSet}"> <ItemsControl.ItemTemplate> <DataTemplate> <TextBlock Grid.Column="{Binding Col}" Grid.Row="{Binding Row}" Text="{Bindi...

dynamic string localization in WPF

I have a C#/WPF application and I am attempting to add multi-language support. From my looking around I've found that using resource files of string values for each language is how I should go about doing this. Then update the CultureInfo. This seems to work fine if the culture info is set at or before the creation of the window, but I w...