wpf

What's the cause of the "Stack empty" XamlParseException when trying to kick off an animation in the OnInitialized handler?

I'm just playing around with WPF at the moment and I don't entirely understand how it works, but this is baffling. I have a piece of code which creates a TextBlock with a RenderTransform and animates it scrolling across the screen. This is pretty much a procedural translation of something Josh Smith wrote to demonstrate how you might do ...

Windows 7 style ComboBox in WPF

Hi, I'm trying to recreate the style of ComboBox in WPF that you see in windows explorer. I'm trying to create something similar to the 'Arrange by:' combobox, which is under Libraries->Documents for example. The combobox has no outline until you hover over it, and when clicked, displays a context menu which allows a single selection. ...

observable collection not getting updated on UI change

Hi Experts, I am trying to bind an observable collection to a user control but it is not getting updated on user change but it is getting updated when the user control is changed through code. Following is an example i tried. It might be a bit long but it is working so you can copy and paste the code as it is. Please see my question a...

How to "Fill" a GridViewColumn with ComboBox (WPF) ?

I am looking for a way to "completely fill" a GridViewColumn with a combo box. I am able to create a cell template with ComboBox and it is working fine. But the width and height of ComboBox is not aligned with the GridViewColumn. Even if i try to set the same height/width GridViewColumn hides some part of the comboBox. There must be so...

Force databinding to initialize

Is there any way that one can force databindings to be initialized on controls right after they are created? My problem is that I've created a own UserControl derived control which must do some time consuming processing before it is shown. More exactly, create thumbnails of video media using the MediaPlayer component of .Net. I'm displa...

How to overlay WPF Control at specific location

I have a FlowDocumentPageViewer that I use to display a multi-page document. I want a small control to appear next to certain paragraphs in the document which the user can do certain interactions with the paragraphs. The control should not appear when the paragraphs are not visible. I have the coordinates of the Point where I want to di...

wpfToolkit : DataGrid Double click problem

Hi I am using wpfToolkit:DataGrid in my application. If I tried to doubleclick on the corner of selectedrow ,It gives null value. But If I click in the middle of the selectedrow I am able to get the cell value. Kindly help me to get the selectedrow cell value irrespective of by dobule clicking any place of the selectedrow. Thanks & ...

Can you host a Java swing app inside a WPF app?

I suppose the question I'm asking is it possible to host a JVM inside a WPF application? WPF = Windows Presentation Foundation Found this so far: http://www.jnbridge.com/jnbp-examples.htm ...

AddOwnedForm - add WPF Window?

I'm working with an existing WinForms form. I'm trying to interface a new WPF Window with it (to replace an old form). The old code called mainForm.AddOwnedForm(newForm);. I know that that makes the new form somewhat of a child of the main form -- it's hidden when the main form is, etc. Is there a way for me to link a WPF window to t...

How the Page call the function in a Window

I'm writting a WPF program.And now i have some problems. There is a Window including a frame, with two Buttons named A and B. Within the frame there is a Page that has a Button C. The question is: how can I have the A button's event handler fire when i click the C Button in the Page? Frame xaml: <Frame x:Name="Frame1" NavigationU...

WPF ContextMenu lose its subitems

Hi guys, I've got a weird issue with WPF contextMenu regards updating the UI! Basically I create a hierarchical list named World. this list contain Countries and each country contain Cities. I bind this list to a label contextMenu. I create a button which delete one city in that list. Here the code ` <Window.Resources> <Hiera...

WPF: Globaly defined ValueConverter

Is there a possibility to declare a IValueConverter for an application global, so that if a conversion in a Binding is needed, automatically the appropriate converter is used. E.g. I have written a IValueConverter that converts between int and MySpecialClass. I have a Binding that has a source that returns an instance of MySpecialClas...

WPF rotate need to cast transformedbitmap to bitmapimage

I have a rotate function that I rotate the image from a button. When I hit the rotate button again I cant because I am returning a transformedBitmap here is my function Public Function RotateImage90(ByVal OrigImage As BitmapImage) As TransformedBitmap ' Create Image element. Dim rotated90 As New Image() ...

Populated DataGrid Won't Let App Close Gracefully

I'm a bit new to the DataGrid control in WPF. I've built a DataGrid into a UserControl, and wrapped that UserControl in a Window. The DataGrid: <DataGrid x:Name="mDataGrid" RenderTransformOrigin="0.167,-0.077" Margin="-2.572,0,5.428,0" IsReadOnly="True" AlternatingRowBackground="#1EA2A2E2" AutoGenerateColumns="False" Height="389" ...

What is the most appropriate WPF control for showing a (color) log?

In WinForms I would use the rich text box to show the live output from msbuild. The performance wasn't that great with large amounts of text. Does WPF have a better performing control? Any techniques to make it perform well? Thanks in advance! ...

Translate a WPF canvas at high scale factors isn't smooth away from origin

Imagine you have a canvas that you want to scale to a very high value and then allow "panning." A good example is a geographic tool that needs to allow panning with "zoom" levels from the extent of the whole earth down to the extent of a few meters. I've found that if you are scaled in to more than, say 500,000, translating becomes ver...

Can a standalone WPF application create an interface that looks like a Flash interface?

It seems like WPF was created as the application answer to Adobe's Flash. Silverlight is used for creating web pages. But, can that same functionality be pulled into a standalone WPF application. Scaleform allows Flash to be used within unmanaged C++ games. Can WPF be used to create the same type of interfaces? What I've read seems to m...

WPF CornerRadius turn the Corners to the outside

Im trying to make my own ControlTemplate for an menu. Id like to turn the corners of some items to the outside. So that it look like the Word TabItems, i cant post an image im sry. But i hope you understand what i mean. Is there a possibility to change the cornerradius like that? or are there other possibilitys? regards Mark ...

How to pass multiple parameters and EventArgs properties when using EventToCommand in MVVM-Light toolkit

Hi guys, I am using MVVM Light toolkit for my WPF application and I would like to know if its possible, when using EventToCommand, to pass multiple parameters to RelayCommand and Is it possible to pass properties of EventArgs instead of passing the whole EventArgs ? Regards, Nabeel ...

WPF render slower with more processors

I'm really at a loss on this one. I have an expander that contains an ItemsControl that looks something like this; <ItemsControl ItemsSource="{Binding Source={StaticResource SomeItems}}"> <ItemsControl.ItemTemplate> <DataTemplate> <StackPanel> <ContentControl Content="{Bindi...