wpf

DirectX and WPF

Hi, I am trying to develop an application where the UI part is designed by WPF and the engine is developed using C++. I am trying to render a scene using DirectX in native code by getting the window's handle from WPF using WindowsFormsHost method. Though i do not get any error, no image renders on the screen. As far as the handle is c...

WPF TreeView HierarchicalDataTemplate - binding to object with multiple child collections

I am trying to get a treeview to bind my collection so that all groups show nested groups and each group will show entry. How can I use the HierarchicalDataTemplate so that treeview will process both SubGroups and Entries collection? Groups show subgroups and entries Example: Group1 --Entry --Entry Group2 --Group4 ----Group1 ------Ent...

WPF - Evaluation of Lambdas in XAML

I am writing an app in WPF. It is getting tiresome making all my converters for simple stuff. I looked around and found WPFix. It seems nice, but has not had any releases in almost a year and is looking abandoned. Has anyone used this? Is it stable? Does anyone have any recommendations for a different solution to allow Lambdas in...

XAML - How to get the name of one element in an other view

I have a component which call 2usercontrols. Usercontrols1 :(code part) <StackPanel Name="NeedThisName" > </StackPanel> Usercontrols2 :(code part) <Button > <Button.Template> <ControlTemplate> <Rectangle > <Rectangle.Fill> <VisualBrush Visual="{Binding Elemen...

[WPF] Lock the scrolling in a ScrollViewer ?

Hi, How can I lock vertical scrolling of a ScrollViewer by using the mouse wheel ? ...

Common Style for PasswordBox and TextBox

How can I define a common Style for the TextBox and the PasswordBox? My approach, I have define a Style for the TargetType FrameworkElement but this doesnt work as common style, then few propertys doesnt exist on the FrameworkElement. My TextBox Style is equals the PasswordBoxStyle <Style TargetType="{x:Type TextBox}"> <Setter Pro...

XAML - Generic textbox stylewith triggers / parameters?

Hello all I want to be able to have a generic style template that can switch colors of my textboxes based on a bool. But I don't want to have to create a unique style for each textbox. How do I do this? I have put some sample code below how I might expect this to work. Three textboxes, all with different bindings but attempting to use...

WPF chart with x-axis selection

Hi Guys I've been searching around for a chart with interactive selection. The idea is you have a long narrow chart with a rectangle overlay which had a handle at each end, this overlay is effectively a selection of some data on the chart. You can expand the overlay to increase selection, also you can drag the overlay accross the charts...

Create element in background thread an then add to main-interface.

Hello, i have a problem with threading in WPF. I want to have created a complex user interface and then i want to add it to my main-window. While this complex user interface is creating i want to show a progress bar in my main window. I think this only could be made with threads. But there is a problem. The created element can't be adde...

Garbage Collection when Attached dependencyobject is destroyed \ disconnected

Hi Guys, When we use any attached property against any dependency object, I thunk it actually maps the property and the value with the dependency object. E.g. <DockPanel><TextBlock x:Name="MyText" DockPanel.Dock="Top"/></DockPanel> Here value "Top" is mapped with DockPanels DockProperty via the dependency object textblock "MyText" ...

Filtering bound XML data in WPF

Hello, Basically I have a WPF application that will display announcements to the user within a listbox. The information that populates the list box comes from a XML file which contains details about different announcements. I am then applying a data template to display the relevant pieces of information. What I have is two buttons at th...

WPF : Binding a combo-box to an enum property of a class object?

In the namespace X, I've got a public enum definition : namespace X { public enum MyEnum { val0=0, val1, val2, val3, val4 } } In the namespace Y I've got a class which has a property of the X.MyEnum type using namespace X; namespace Y { class Container { public MyEnum MYEnum { get { return m_myenum; } ...

How to change BitmapEffect in custom WPF control via C# code

I have a custom control type like: <Grid> ... </Grid> and Grid.BitmapEffect property. How can I change BitmapEffetc in this Control (Grid) via C# code (e.g. on event)? Code sample - part of custom control: [...] <Grid Background="#FFE5AA"> <Grid.RowDefinitions> <RowDefinition Height="62*"/> <RowDefinitio...

Overlaying Notification Icon with text

Hey Guys, After some help here, I've got WPF using the windows.forms notifyIcon class (It's not a major app so not worried about purity). And I was wondering if its possible to overlay some text on the icom? Basically I need it to visually show how many entries is in my gridview. And run this on everytime the SizeChanged event. This is...

WPF Dockable Windows Like iGoogle

I'm looking for a dockable windows/panel control in the style of iGoogle. All of the ones I have found so far all have a fixed length on the height of your window/panel but I want to be able to have windows of varying length like iGoogle. The best I have found so far has been a control libarary called BlackLight which does not have the ...

WPF Charting Toolkit: SelectedItems instead of SelectedItem?

I want to select many points/bars/columns etc in all types of charts that the WPF charting toolkit provides, something that the toolkit does not seem to support. I really would like to avoid writing my own DataPointSeries... Any ideas how to achieve that? ...

WPF Window Docking

Hi, I am having multiple windows( .xaml files). I want to dock one window in other. Say, I am having a ParentWindow.xaml. On a button click in ParentWindow I open ChildWindow.xaml. After opening ChildWindow.xaml, I have to dock it in the ParentWindow.xaml. How to implement this? ...

WPF How to set a maximum amount of results from CollectionViewSource

I am trying to display a set of data using a DataTemplate in a ItemsControl, with the ItemsPanel set as a uniform grid of size 3 x 3. The ItemsSource of the ItemsControl is set to bind to a CollectionViewSource which filters the source collection based on a search term. This all works fine. The list I am binding to is of an arbitrary si...

Which way to go with graphic-intense multi-touch app, XNA or WPF ?

I am about to start development of a multi-touch application. I need to decide between WPF and XNA. Which would run faster ? WPF already has libraries to support multi-touch via TUIO input. Does anyone know a similar library or even just sample code to drag/rotate/move objects in XNA ? Thanks! SW. ...

Silverlight 3 LoadedEvent routed to ViewModel

My client is trying to hook to a usercontrols Loaded Event in the View Model. Basically they want to know when the controls loaded event triggers inside the view model. They are looking for a way to do it without code behind the xaml. Is this even feasible. I am looking into whether I can route the loaded event to the viewmodel in th...