wpf

Focus movement between list and other elements. WPF.

Hello. In my window I have the listview and other elements. How I can achieve such behavior of focus: when I press downkey on last listitem focus moves from listview on another element, accordingly pressing upkey on first element moves focus away from list. So focus on pressing up-downkeys can move from other elements to the list, pass...

Hide or disable Input Gesture Text in wpf.

Say we're using "Ctrl+S" input gesture for saving the project. In File menu - "Save Ctrl+S" such text is displayed. Now on canexecute of SaveCommand I check whether project required save or not. If it doesnt require then Save is disabled. In that case I see menu item like " Ctrl+S" . I've to hide this input gesture tex...

Access my Views from bound ItemsControl

Hi! I have a typical MVVM scenario: I have an ItemsControl bound to an ObservableCollection of StepsViewModels. I define a DataTemplate so that StepViewModels are rendered as StepViews. The same happens in the StepView: I have an ItemsControl to an ObservableCollection of ParameterViewModels with a DataTemplate to render them as Paramete...

update list in application when service works

So i have a service that creates letters and puts them in a database (sql-server). I also have an application (c#,wpf) where there's a list with letters(from the database) How can i trigger an event in the application if a new letter is made? (so that the list should be updated) Anyone who knows how to do this? Thanks ...

Problem with filling control

Hello, I have problem with filling control. In first column I have stackpanel and it has 4 controls. Every ScrollViewer as DataContext has TreeView, which has Height set as Auto. When I expand nodes in my treviews it expands out of window. How can I fix it ? <Grid x:Name="MainGrid"> <Grid.ColumnDefinitions> <Colum...

Binding to DataGridTemplateColumn

hi, I have a User table and I have a foreign key of this table from a Book table. the FK is ProxyResponsibleUser_ID. when I use DataGridTextColumn in my DataGrid anything is OK but now I want to use DataGridTemplateColumn to display the FullName column from User table for corresponding user with ProxyResponsibleUser_ID. I get an error s...

WIF authentication scenario. STS implementation questions.

We’re considering using WIF for authenticating our users, so I’ve started to gather some information on how to do this the right way. Mainly how we should create the STS. I’ve had a hard time finding some information about our scenario where we have a “main” service that will be used by clients both internal and external. Internal clien...

WPF : Save content of a visual Object as a image file?

I need to save the content of a WPF Object as an image file. In my application I have a chart drawn on a canvas object. This is what I need to save. The canvas with all child objects. ...

Reflection and private delegate fields of events in c#

I'm probably doing something silly, but here it goes. I'm trying to get the FieldInfo from a public event via reflection. Check this function: public void PlotAllFields(Type type) { BindingFlags all = BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public; FieldInfo[] fields = type.GetFields(all); Con...

Dependency property in User Control is null after assigning value

I have a user control, has a Frame as a dependency property public partial class NavigationBar : UserControl { public NavigationBar() { this.InitializeComponent(); } public Frame NavigationFrame { get { return (Frame)GetValue(NavigationFrameProperty); } set { SetValue(NavigationFrameProperty,...

WPF: Detect Ctrl+MWheelUp/Down

i can bind Ctrl+C or Ctrl+LeftClick. but can i bind to mouse/scroll wheel actions? i am trying to do something like increase/decrease font size like in the browser. so ctrl+mwheelup = increase font size ...

How to make sender to be a Button and not the MainWindow in WPF CommandBinding ?

The Button in WPF MainWindow has normal command attribute. When clicked the handler method receives sender. But the sender is always MainWidow. How to get sender to be a Button ? I need it to be a particular button, because I set this command to several buttons and want to use single handler for many senders. Thank you ...

PageFunction not being disposed of causes crash

I have a WPF "wizard" where I am using PageFunction objects to display the various pages in the wizard. Several of these pages use references to objects in other assemblies within the application so the user can select "packages" they want to include in a generated ouput. In the page function, I have the keep alive flag set to true so ...

How to raise Onload/OnUnload event from FrameworkElement for unit testing purposes?

As you can see here, I can't use reflection to get the multicast delegates of the private fields behind these FrameworkElement events because they aren't field-like. So how to do it? ...

override WPF styles

Hi, Looking at SharpDevelop source code I found this button declaration: <Button Style="{x:Static core:GlobalStyles.ButtonStyle}" Content="{core:Localize StartPage.StartMenu.NewCombineButton}" Click="newSolutionClick" Margin="8,0,0,0" /> my problem is the style declaration: Style="{x:Static core:GlobalStyles.ButtonStyle}" it pre...

XAML/Silverlight CheckBox ToolTip

Im trying to add a tooltip to a checkbox in XAML, however all i get is errors: <ToolTipService.ToolTip> <ToolTip x:Name="ToolTipDelete" Content="Delete" /> </ToolTipService.ToolTip> Anyone know how I might add this to a checkbox? Silverlight 2. ...

IsEnabled or Enabled?

Throughout Silverlight and WPF properties that are boolean values are prefixed with Is (almost all), for example: IsEnabled IsTabStop IsHitTestVisible In all other Microsoft frameworks (winforms, BCL, ASP.NET) Is is not used. What prompted their team to move away from the original naming convention - is it an evolution or a mis...

WPF, copy command-How to copy only one cell from selected row of RadGridView?

Hi, I have RadGridView and I want to copy one cell of selected row by using copy command. I try to do it by writing this code in the button: Command="Copy" CommandTarget="{Binding ElementName=GV_Results, Path=SelectedItem.M001}" but it didn't work, the button remains disabled. Thanks a lot. ...

Blendability: isn't it solved with d:DataContext? What am I missing?

I feel as though I still see a lot of guidance and advice stating that a view-first approach is the best way to go to get Blendability in your application. However, with d:DataContext, d:DesignData and d:DesignInstance, isn't the problem of Blendability easy to solve regardless of how your views and viewmodels are wired together? With D...

Modal/Kiosk UI framework for Winforms/WPF?

I'm currently working on a windows application which is entirely model, that is, it removes the start bar, disables alt-tab, etc. Thus far what I've done is use a maximized, topmost, MDI container and hide/show the child forms as the user navigates through them. This works fine until you start getting into more complex interactions whe...