Now I'm about to learn RoutedEvents. I understand bubbling and tunneling and all. But I have a little problem I'm not sure how to handle.
I've got a ItemsControl in my own defined UserControl ( inherits TabItem ). This itemsControl could be a ListBox or some selector not decided yet ( depends what is best with this solution ).
Now when...
What is the difference between AppDomain.UnhandledException and Application.DispatcherUnhandledException in .NET?
I need an event that is fired when any unhandled exception occurs. I have come across these two, but I dont know in what ways they differ from each other. Also, are there cases when they are not fired?
...
Can we calculate the gap bettwen ChildWindow and ParentWidnow?
While I can Drag arround the ChildWindow there is a Distance from the Top and Left.
WHile I try to get the Distance using:
ChildWindow.Margin
it is returning 0,0,0,0
Is there any other method to get the Distance bettwen ChildWindow and ParantWindow?
Thanks,
Subhe
...
My scenario:
I have in my form a tabControl.
I've extended the TabItem control to some other classes that I want to add the TabControl.
I need that each one of the ExtendedTabItem have a specific header and data template.
Something in the line of:
<DataTemplate DataType="ExtendedTabItem">
<StackPanel Height="100" Width="90">
...
Hi,
is there any way to determine the visible region of a WPF control that is clipped by parent controls (e.g. ScrollViewer, Canvas, or panes)?
Background of my question: we are using the WebBrowser control in our application. Since it is derived from HwndHost, parent controls cannot clip it, i.e. it will overlap parent controls, whic...
Does WPF 4 contain also a virtualizing WrapPanel or is it easy to make one deriving from an existing panel. I want to make an address-view such as outlook has.
...
I'm not sure where to look for this one... I've got a viewmodel that has an underlying DataRow providing part of the model. I want to display this information as a single record, in a vertical layout. I planned to use the DataGrid because I want the user to be able to add/delete/rename rows right across the DataTable despite only looking...
I have a strange behavior in VS2008 a few times: After some changes in a xaml file, removing a control with a compile time error, VS2008 keeps saying the error is still there, even when the control itself is not there anymore. I could only fix it by creating a new xaml file, copying the content and deleting the original file. I cleaned t...
I am trying to find a solution to let a TextBox show and validate data from two different sources as this little example shows:
<TextBox Text="{Binding Port.Name}"
ValidationSource="{Binding Ship.PortFK}"/>
Here the Ship data object contains a property that functions as a Foreign Key to a Port, the property has its own validators.
I...
Hi !
I use a listview to display data like a data matrix (columns and rows). My problem is : my items are typed : MatrixCellVM.
I tried everything I found on the net to apply a DataTemplate on this items but nothing worked.
Here is the latest technique I'm using
foreach (var col in dataMatrix.Columns)
{
//create th...
Any help on existing tab control like Chrome tabs?
I have been searching all over for mutitabs control that allows dragging each tab, with no luck.
...
Hi,
I am using VS 2010 and a datagrid.
I need the ability to either single click or double click and process the action in my ViewModel.
Is this possible?
I could not find an example using MVVM.Can you provide one,a link or a snippet etc..
thanks a lot
...
How can I retrieve the CommandTarget in the Executed callback of a RoutedCommand?
Thanks.
Edit: adding a verbose sample
Commands class:
static class Commands
{
public static readonly RoutedCommand MyCommand = new RoutedCommand();
}
XAML code
<Window.CommandBindings>
<CommandBinding Command="{x:Static BasicWpfCommanding:Command...
I am developing a WPF app that contains a webbrowser control that loads a silverlight application. I would like to be able to launch the app from visual studio (F5) and have the debugger attach to the silverlight code. However, I've not had any luck with this.
The best I can currently do is to launch the app without attaching, then once...
I have a ContentControl bound to a PhoneNumber object, and the control's Style.Triggers applies different ContentTemplates when the control has or doesn't have keyboard focus.
<Setter Property="ContentTemplate" Value="{StaticResource DisplayPhoneNumberDataTemplate}" />
<Style.Triggers>
<Trigger Property="IsKeyboardFocusW...
By default, text is centered in the headers of a ListView (not in the content cells!), I've been struggling to make it left aligned, here's what I've come up with:
<ListView.Resources>
<DataTemplate x:Key="Templ">
<TextBlock HorizontalAlignment="Left" Text="{Binding}"/>
</DataTemplate>
</ListView.Resources>
...
<GridVi...
Hello,
It appears that the args object passed into an override of OnPreviewMouseLeftButtonDown describes the current (live) mouse button state, not a snapshot of the state present when the event occurred.
Is this proper behavior? Shouldn't event arguments reflect event data at the moment the event occurred (a snapshot) and not be autom...
I have a couple of user controls that are loaded at runtime that contain a bunch of buttons. I register those button click events in my data class by getting a reference to the user control. This is how I'm doing it now in my data class:
MainWindow.Instance.Menu1Instance.Button1.Click += new RoutedEventHandler(Button1_Click);
Proble...
Is it possible to deploy with ClickOnce a WPF app that calls one or more WCF services?
It is a "normal" WPF app, not an XBAP WPF.
Does anyone has an example?
...
I'm trying to bind a view model property to the 'SelectedItem' attribute of a WPF combobox. This combobox resides within a RowDetailsTemplate of a DataGrid. The binding is partially there because the view model's property getter and setter each get called once when a row is selected (And thus causes the details view to expand). However t...