I have a custom panel with some items. When one item has the focus and I want to navigate to the next item by pressing the right arrow, the focus jumps to the nearest item to the right. However, I want the focus to move to another item, determined by my own logic. How can I change the focus order?
...
I want to have a textbox append a specific string once the user tabs out of the control, i.e. LostFocus, however I prefer the textbox to validate as the user types, so UpdateSourceTrigger is set to PropertyChanged.
Is there a way to get this to work in WPF?
Looked at this question which is similar but wondering if there is a cleaner ...
Hi,
I've been trying to get my WPF application to span multiple monitors for some time now, and nearly have it working.
The problem seems to arise when I set the following line:
win1.WindowState = WindowState.Maximized
This causes the application to span only the primary screen.
My code is as follows:
public partial class App : Ap...
Hi
I have a scenario where i am successfully loading a flash file in to a window using:
AxShockwaveFlashObjects.AxShockwaveFlash axShockwaveFlash1 = new AxShockwaveFlashObjects.AxShockwaveFlash();
But if there is a passwd set on flash file i am wondering if we can programatically set the password rather than in the ui to open the file.
...
I have a DataTemplate that I want to find using the FrameworkElement.FindResource(). To do that I need to have a key on the data template.
The problem is that x:key and assigning a data type are mutually exclusive. (Reference)
So, once I set the DataType for my template, how do I find the Key value? Is there some formula that conver...
Hey guys,
I am new to WPF and am trying to create a WPF control that displays a string (which will always be a number) in a particular way. There will be three different text fields on the control and the string needs to be split up into three different components following these rules:
Lets say you have the string "1.5678". The cont...
I got this error in a WPf Application when calling the InitializeComponent. In the Designer I get this error:
Could not load file or assembly 'LCP.ScanLite.WindowsWPF, Culture=neutral' or one of its dependencies. The system cannot find the file specified.
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String code...
Hi, I have some controls in a Canvas. I need to animate their Canvas.Top and Canvas.Left properties. I'm using a foreach where I start all the animation:
foreach (Control c in controls)
{
tc.BeginAnimation(Canvas.TopProperty, yAnimation);
tc.BeginAnimation(Canvas.LeftProperty, xAnimation);
}
where xAnimation and yAnimation are t...
I need to set a control's background to the color of the parent's background in XAML. Why not simply make the background transparent? It's a button with a drop shadow, so I need to set the background; otherwise, the drop shadow shows through.
So, from my control's markup, how do I set the Background property equal to whatever the parent...
In WPF, I want set a controls width to be, say, 97% of it's Parent controls ActualWidth property. How can I do this?
...
Are there any working piemenu controls for WPF?
...
Hey guys,
Is there a free alternative to Expression Blend? I am not able to purchase Expression Blend and am looking for a stand-alone XAML designer that I can use to help me when designing WPF controls.
I found apps like Kaxaml but I am looking for something that has drag-drop support so that I can build the control right in the desi...
I have a tab control with two tabs and a listbox which is common to both tabs. This listbox needs to be aligned inside the tab specific content. Therefore I don't place it outside of the tabs. I have an another list box on one of the tabs. When I select an item in the second listbox, the first list boxes selected item becomes blue, so I ...
I have the need to create a wavey looking text object in my WPF app, and I was actually assuming that there would be a "bend along a path" type of options, but I dont see one at all in Blend.
I found a tutorial that suggest you need to convert you text to a path letter by letter then rotate it around, but that is totally horrible in my ...
I am new to WPF and am wondering how to best achieve a master detail grid as shown below.
The user will be able to press the right/left arrow keys to open/close Parents or click on the icon to achieve the same result. The data structure will be a parent/child 1 level deep.
How would I go about this?
-------------------------------...
This XAML compiles and runs without any runtime errors:
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:Cus...
The Webbrowser in WPF can't display page unless mouse moving on.
This bug can't reproduce in my demo project, and I don't know how to fix it.
I tried:
call WindowsFormsHost.UpdateLayout. (Failed)
call WindowsFormsHost's child, a WebBrowser control. call WebBrowser.Update or WebBrowser.Refresh. (Failed)
call WindowsFormsHost.Invalidate...
I have a WPF webbrowser control which navigates the user to a registration site. After the user registers, a collection of headers are sent back alongwith the "finished registration" page.
I have tried the Navigated event, and tried accessing WebResponse property in the event arguments but it's always null.
Is there any other way to acce...
I would like to indicate to the user that a particular textbox or combobox is mandatory. What is a neat way to do this?
Currently, I have a gradient red border around the textbox when the text is null or empty, but it seems a bit much when you show a form and a number of the fields are red. I'm looking for something that is clear, but i...
I am converting a WPF application to a similar WPF User Control.
And the user control is hosted on WinForm using ElementHost.
public partial class UserControl1:UserControl // public partial class Window1 : Window
{
private void UserControl_Loaded(object sender, RoutedEventArgs e) // Window_Loaded(object sender, RoutedEventArgs e)
...