wpf

Adding a static ResourceDictionary to UserControls before the XAML is parsed

Hello community, I have one WPF control that I want to use in my WinForms application (using an ElementHost) in several places (=> multiple instances of this control). Furthermore I want all instances of my UserControl to share one single Instance of a ResourceDictionary. In WPF applications I would achieve that by merging my Resource...

TreeListView, tryringto combine listview and tree

I have treeView that is bounded to a class that imlements the interface - IHaveValue. Inside countryies, I want the inner items that are also IHaveValue to act as ListView, that allow grouping. I've seen this question but is doesn't helped: link text ...

how to hide/toggle by default a DockingPane in AvalonDock ?

Here is the XAML markup. I'm trying to make by default "tools" pane hidden. I've seen in the tutorial something like this : Command="ad:DockableContentCommands.ToggleAutoHide". <ad:DockingManager Name="dockingManager"> <ad:ResizingPanel Orientation="Horizontal" > <ad:ResizingPanel Orientation="Vertical"> ...

Help with binding in WPF

Hello, I have this xaml: <Image Source="sourceHere" Stretch="Uniform" Width="100" Height="100"> <Image.ToolTip> <Image Source="{Binding thisImage.Source}" Stretch="Uniform" /> </Image.ToolTip> </Image> the parent image is a thumbnail of a bitmap, but I want the tooltip to show the image with 100% size. How can I bind ...

Is there a Property Dialog control that i can use in my WPF App?

I'm building an application using WPF that will be a designer of sorts, meaning, a user can drag and drop custom UI elements into a canvas and be able to configure their behavior via properties. (Think of this like a domain specific PowerPoint. You can add elements to the presentation, configure the elements' properties and then eventua...

Permission issue running Wpf application in Vista

I created a WPF Desktop application and have tried deploying it to vista without success. The application performs a scan and uploads the data to a web service on the internet. It should also log any exceptions using NLog to the hard drive. When I run the application it errors out when trying to send the data to the web service. If I run...

Why ValidateValueCallback was called twice when constructoring the related type?

Suppose I've the following DependencyObject type, public class Test : DependencyObject { public int Order { get { return (int)GetValue(OrderProperty); } set { SetValue(OrderProperty, value); } } public static readonly DependencyProperty OrderProperty = DependencyProperty.Register("OrderProperty...

The Background of the selected row do not change in ListView Control, WPF

I have the following ListView with a ListView.ItemTemplate: <ListView.ItemTemplate> <DataTemplate> <StackPanelName="stackPanel" Orientation="Horizontal"> <TextBoxName="textBoxOrg" Background="Transparent" BorderThickness="0" TextWrapping="Wrap" Text="{BindingOrgText}" IsReadOnly="T...

How do I get current ListViewItem with a control in ItemTemplate, WPF

I have the following code: <ListView.ItemTemplate> <DataTemplate> <StackPanelName="stackPanel" Orientation="Horizontal"> <TextBoxName="textBoxOrg" Background="Transparent" BorderThickness="0" TextWrapping="Wrap" Text="{BindingOrgText}" IsReadOnly="True"/> <TextBoxName="textBoxNew" ...

How to convert image in byte array

hello expert I'm new in C# is any body Suggest me how can i convert the image into byte array..and vise versa ..if any body have some code sample help me out i m develop a wpf application and enable to find stream reader. thanks in advance shashank ...

Split geometry or use multiple materials in order to quickly change vizualized colors in (WPF) 3D scene

Hi 3D guru's out there, I'm developing a WPF application that uses 3D for vizualizing a pipe system. At a certain moment it must be possible to color those pipes according to a value on certain points. See the figure below. This shows a 2D cross section overview of an elbow and a pipe attached to each other. On this pipe some points ...

wpf polyline data query

Hi, i am trying to draw arrow of -> <- and up down arrows as the button image in wpf. but i could not understand how this polyline is drawing images on button.. can anyone give me the polyline datas for all the arrows?? ...

Good or bad practise for Dialogs in wpf with MVVM?

hi, i lately had the problem of creating add and edit dialogs for my wpf app. all i want to do in my code was something like this. (I mostly use viewmodel first approach with mvvm) ViewModel which calls a dialog window: var result = this.uiDialogService.ShowDialog("Dialogwindow title goes here", dialogwindowVM); ... do anything with...

WPF Accordion VerticalAlignment bug

Hi all, Using the Accordion control from the latest WPF toolkit i came across this issue. When an accordion control has its VerticalAlignment set to 'Stretch' the AccordionItems contained within it will no longer expand if the SelectionMode is set to 'One'. If the selection mode is set to 'ZeroOrOne' you get expansion after several attem...

debug wpf by using sos.dll issue

I am using sos.dll to find memory leak in wpf . And I found a wpf object was not released, then I tried to find out why it is not released by using !gcroot it gave me a warming that: Please note that 6c369950 is not a valid object. snippet of the debugging info !dumpheap -type WPFUILib.MenuWindow Statistics: MT Count To...

Animating "this" and "other" in WPF

Consider following DataTemplate in any List Control: <DataTemplate> <TextBlock Text="{Binding}" /> </DataTemplate> and following animations: <Window.Resources> <Storyboard x:Key="animExpand"> <DoubleAnimation Storyboard.TargetProperty="Width" To="400" Duration="0:0:1" /> <DoubleAnimation Storyboard.TargetPrope...

Saving GridSpliiter position

I have this: <Grid.ColumnDefinitions> <ColumnDefinition Width="50*" /> <ColumnDefinition Width="5" /> <ColumnDefinition Width="50*" /> </Grid.ColumnDefinitions> <GridSplitter Background="{x:Static SystemColors.ControlBrush}" Grid.Column="1" Margin="0,0,0,0" ...

How do I bind the SelectedValue of a ComboBox to a Property?

Hi, I've got a ComboBox with an ItemsSource which I've bound to a List(Of String). What I'd like to do is have the XAML update a String property when the SelectedValue of the ComboBox changes. I've seen a whole bunch of examples for TextBoxes which use Text="{Binding Path=MyString}" sort of stuff, but I don't really think that'll be...

how we put integer validation on text box in wpf

Hello experts: I'm making a Wpf Application. I want to put validations on interger and character textboxes. How can i achive it? Please help me out guys . Thanks in advance. Shashank ...

wpf resource binding to another element's property

I'm new to WPF so pardon me if i'm asking something stupid. I have an class named Person in my application. Can i do something like <local:Person x:Key="p" BirthYear="{Binding Path=Value, ElementName=year}" /> where 'year' is a control? ...