wpf

WPF Zooming Problem

In WPF, I have a sort of Curve Editor, which consists of a scrollviewer (for panning) on top of a canvas, where I display keys, and curve segments (linear, constant and splines). I'm using MVVM. Also, I might have hundreds of keys, with segments between each other. Also, the panning/zooming must be really smooth and responsive. In the...

Running vbscript from WPF's WebBrowser

I have a WPF window that is hosting WebBrowser control. The Web page showing up has vbscript that is loaded when the Html's Body onload event It doesn't work for me, so I am calling the script with the code using _webBrowsercontorl.InvokeScript("scriptName") but that even doesn't work. Any idea? ...

WPF application, freeing resources (images).

Hi, i have a slideshow application showing some images. I have a simple usercontrol that displays an image. I read the images from an XMl file and each time i create a new instance on a new usercontrol and show it in my application. At some point i need to "refresh" theimages (e.g. new version) i remove all my usercontrols from the appli...

How can make all my user control dependency values load before they control accesses their values?

When I call this custom control, I have to put the attribute values in the correct order since the third dependency property (ItemTypeIdCode) accesses the values of the first two (KeyField, ValueField) to look up data in the database, and if they come after the first attribute, then their values are empty. <controls:DropDown x:Name="The...

How do I insert ToolBar separators when binding ItemSource

I am binding a ToolBar to a collection of command view model objects. The objects in the collection have a property IsSeparator that when true I would like represented with a <Separator/> in the ToolBar. My basic markup looks like this: <ToolBar Grid.Row="1" ItemsSource="{Binding Path=ToolBarCommands}"> <ToolBar.ItemTemplate> ...

How can a property be bound to a type

I have two HeaderedContentControls like those below that each have their content property bound to one of two view model properties of the same base type (one control is on the left side of the window and one on the right, thus the view model property names). However, either view model property can be one of four different derived types...

wpf checked list box question

I am creating checked list box with the following template: <Style x:Key="CheckBoxListStyle" TargetType="{x:Type ListBox}"> <Setter Property="SelectionMode" Value="Multiple"></Setter> <Setter Property="ItemContainerStyle"> <Setter.Value> <Style TargetType="{x:Type ListBoxItem}"...

Translate XAML EventTrigger to C# Code..

Can anyone tell me how this would look like in C#? <EventTrigger RoutedEvent="Button.Click" SourceName="btnSplit"> <EventTrigger.Actions> <BeginStoryboard> <Storyboard> <DoubleAnimation From="0" To="1" Duration="0:0:0.25" Storyboard.TargetName="gridS...

Hide weekends on WPF toolkit chart

I am making a small app that plots financial price data and since the finance markets are closed on the weekends, I have no data for those days. By default the chart, found in the new WPF Toolkit, shows a large gap between Friday and following Monday and this behaviour is not acceptable. I am trying to figure out a way to "hide" the week...

xamDataGrid and Combobox (how to access cbx?)

Hello Experts, I am using a xamDataGrid (Infragistics), one Column has to contain a combobox. The items in the combobox are computed, based on the data entered in teh cells before. How can I access the combox in the ActiveRow ? Thats the XAML: ...

WPF "flying" combobox

Hello, is it possible to create a combobox in wpf from code, which I could position wherever I want on the window? In my case, I basically want to create something like a Autocomplete for DataGrid rows,... Thanks! ...

Binding a WPFToolkit DataGrid's event to a ModelView's Command (MVVM)

Hello, In particular I would like to know how to bind the 'SelectionChanged' event of the dataGrid to a Command on my Viewmodel. Since DataGrid doesnt have a Command property, how do I call a modelView command as in MVVM fashion? I dont mind using a delegate on the code behind XAML, if I knew how to do that... Since I am new to WPF I ...

Picture/Image of a usercontrol

Very simple question. I want to take a picture/image of a usercontrol very often and display that picture somewhere else in my application. I am not going to save the image to the disk. The question is, how do I take a image of usercontrol? ...

How do I display only the list items that will fit on screen in WPF?

I have an application that will have a dashboard like interface for the main screen, and I need to display a list of recent items in the top left of the screen... each item view will be a fairly tall item displaying quite a bit of data... I want to only display the items that will fit on the screen in the area that the control is in... I...

How to reload controls without getting other controls stuck?

I handled a click event to a button. It calls control1's animation function and control2' reloading content function. However, control1's animation will being "hanging" for a second while contorl2 is reloading content. How can I reload control2's content without blocking other controls on the UI? My second question is how can I use b...

WPF DataGrid: edit all cells, new row position, click once to edit

I was wondering if anyone could point me into the right direction with DataGrids. I'm trying to position the new row at the top of the grid When the user clicks a cell all cells in the row move into an editable state. Cheers ...

How to mix databound and static levels in a TreeView?

I have a collection of Database objects, each containing collections of Schema objects and User objects. I want to bind them to a TreeView, but adding additional static levels in the hierarchy, so that the resulting TreeView looks more or less like this: <TreeView> <TreeViewItem Header="All the databases:"> <TreeViewItem Header="Db1"...

DependencyProperty Callback-Method not called

Hi, I create a UserControl (TableWithFilter.xaml) with a dependency property (source). The UserControl is a Table with a source property for the different items. I created the XAML and set the source property via the XAML Binding. So far so good. But if the value of the dependency property is changed, the defined callback method is not...

How to push data over the Internet?

I want to push data to a client application. The client app can be thick or a thin. The push has to happen over the Internet. How can this be done? EDIT: Is there a way wherein the client app opens a connection to the server, keeps it alive for its lifetime and then continues receiving data over that connection. Can I build something li...

Text wrapping, grid and star sizing

I have some text data that I want to display in a grid, with three columns, the middle column being twice as wide as the other two, taking up the full width of the grid. The text is long and needs to be wrapped. What I can't get to work (and from other queries here in the past, I see others have had similar problems) is getting word wrap...