wpf

How do I provide two default templates for a Custom Control in WPF?

In Charles Petzold's "Using Templates to Customize WPF Controls" article in the Jan 2007 edition of MSDN Magazine (http://msdn.microsoft.com/en-us/magazine/cc163497.aspx), he says, The ProgressBar control actually has two default templates for the two orientations. (This is true of ScrollBar and Slider, as well.) If you want your new...

How can I add wpf browser application in asp.net page

I write a WPF application. but i want to add aspx page like java applet but I don't find any idea. Can you help me? Please look at: http://img132.imageshack.us/my.php?image=wpfinaspuc2.jpg ...

How to stop one of multiple WPF dispatcher?

I have an app with some background threads (actually an in-proc WCF-Service). Each thread runs its own Dispatcher to use some WPF-classes (MediaPlayer-objects to process some audio/video-files; it queues some delegates with BeginInvoke and finally call Dispatcher.Run). When the processing is done, I want to shutdown its dispatcher so tha...

wpf border control to span the width of listboxItem

Im trying to define a dataTemplate for a business object in my wpf application a collection of which is being bound to a ListBox. <UserControl.Resources> <DataTemplate x:Key="ResizedItemsDataTemplate" DataType="{x:Type resizer:ResizeMonitorItem}"> <Border x:Name="bdr" BorderBrush="Blue" Border...

JQuery with WPF? Possible as on Adobe AIR?

From what I understand about Adobe AIR, you can use Javascript/HTML to develop desktop applications. Does WPF also allow the use of Javascript/JQuery to build controls? Or is Microsoft's solution for interactivity here solely XAML? ...

Is this list a correct understanding of Microsoft's current application deployment options?

I'm trying to get my head around the many application deployment options which Microsoft currently offers. Doing a little research turned up dozens of confusing terms: "WPF App" "ClickOnce App" "WPF ClickOnce App" "MSI App" "XBAP App" "XBAP App deployed with ClickOnce" "Installed ClickOnce App" "WPF Web App" "ASP.NET Web App" "ASP.NE...

What to do when WPF Window doesn't recognize user control defined in the same project?

I have a window "Operation" in XAML that uses a user control "Status" defined in the same project. When I build the solution, it returns ok, but when I open the design view for the Window, visual studio says "Could not create an instance of type 'Status'. The XAML for the Window "Operation" is below: <Window x:Class="TCI.Indexer.UI.Ope...

Finding out who is listening for PropertyChangedEventHandler in c#

I have a WPF form and I am working with databinding. I get the events raised from INotifyPropertyChanged, but I want to see how to get a list of what items are listening, which i fire up the connected handler. How can I do this? ...

How to retrieve text from the clipboard in partial trust

We have a RichTextBox WPF control and since we control the layout, we simply cannot allow any rich content... Therefor, we need to strip all data except text from the clipboard. For example, if someone is trying to copy/paste lets say text from a table directly from Microsoft Word, the RichTextBox also takes into account that this text...

How do I add horizontal margins to my WPF TabItems without cutting off the tab?

My TabItems before attempting to apply a left margin of 10 look like: After attempting to apply the left margin of 10 to the blue tab, the blue tab gets cut off like: How do I do this properly? ...

Is it possible to reference a file stored in Isolated Storage by its URI?

Using this previous question as motivation, I would like to temporarily store images and videos in Isolated Storage. My application (written in WPF/C#) will allow a user to review these temporarily stored items by viewing their contents in a MediaElement. I was hoping to set the MediaElement's Source Property to a video or image's URI st...

How to stretch in width a WPF user control to its window?

I have a Window with my user control and I would like to make usercontrol width equals window width. How to do that? The user control is a horizontal menu and contains a grid with three columns: <ColumnDefinition Name="LeftSideMenu" Width="433"/> <ColumnDefinition Name="Middle" Width="*"/> <ColumnDefinition Name="RightSideMenu" Width="...

How can I select the Next/Previous TreeViewItem in a TreeView?

I have First/Last/Previous/Next buttons that change the selected child node of a TreeViewItem. Setting the First and Last node as selected is not a problem. For example, to select the last child node: TreeViewItem selectedItem = (myTreeView.SelectedItem as TreeViewItem); TreeViewItem ParentItem = (selectedItem.Parent as TreeViewItem); (...

Is faking a WPF mouseover possible?

I have a data template with a textbox and a button with some styles on it. I would like to have the button show the mouse over state when focus is on the textbox beside it. Is this possible? I figure it would involve something like this. I can get the textbox through use of FindVisualChild and FindName. Then I can set the GotFocus even...

Multi-column Tree-View in WPF

Anyone know where I can get a control like this? Thanks! ...

Is there an official Windows Presentation Foundation (WPF) logo?

Is there an official Windows Presentation Foundation (WPF) logo like there is for .Net and ActiveX? ...

How do I make toolbar button expandable?

I want to have a button on my toolbar that has a little down arrow that when I press, gives me sub toolbar options. Think of the Undo/Redo buttons in Visual Studio; when I click the arrow next to the icon it pops open the list of edits I can go back to. ...

WPF ListViewItem lost focus event - How to get at the event?

Hello, I have a listview that you select a row/item on. This is linked to a datatrigger that displays an image on the row. The image should only be displayed when the row is selected. This part works fine, however when you move the focus to something else, such as a textbox, or a messagebox is displayed, the listviewitem loses focus ie ...

Handling Events from the Business Layer in XAML WPF

I am very new to WPF, and I have a very basic WPF question: Suppose we have a custom dll with some business logic that fires events such as ModemIsConnected. On the UI side (.xaml) there is a label that changes its value to OK once that event is fired. I would like to offload the event handling portion (changing label's status and other...

Why is using an abstract class for DataBinding in WPF different from using an Interface?

As we all know, we can't use DataTemplates with Interfaces, but apparently (old question) we can use abstract classes. Why? The multiple inheritance argument goes for abstract classes as well... ...