So, this is the issue:
I have a Windows Forms User Control that I placed in main Window of my WPF application. I override paint method of User Control. It paints ok in "ideal" case. But, after showing the control in main window, I added MessageBox. This is the code snippet:
board = new BoggleBoard(Boggle.CurrentGame.Size);
board...
Hi,
I have a Listbox and a Border in a StackPanel similar to the following:
<StackPanel Orientation="Horizontal">
<ListBox>
<ListBoxItem Content="People"/>
<ListBoxItem Content="Animals"/>
<ListBoxItem Content="Cars"/>
</ListBox>
<Border Width="200>
<ContentPresenter/>
...
this is the xaml:
<Window x:Class="WpfApplication4.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:local="clr-namespace:WpfApplication4" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1"
Height="300" Width="300">
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
...
Hello,
when I jump into the PreviewKeyDown the char righthand to the Caret in my RichTextBox is not moved YET. I would like to say to this event do your stuff move the char to the rightside and THEN let me do MY stuff. How can I do that?
private void RTB_PreviewKeyDown(object sender, KeyEventArgs e)
{
if (e.Key == Key.Space)
{...
I'm not even sure how to express this, so im very sorry if the title is confusing.. My XAML (simplified) looks like this:
<UserControl x:Class="PBA.Application.Client.UserControls.UserControls.FreqReserve.OverView" xmlns:FreqReserve="clr-namespace:PBA.Application.Client.UserControls.UserControls.FreqReserve">
...
<DockPanel>
...
I have a WPF usercontrol which contains a number of textboxes and buttons. Currently these textboxes and buttons are all created and loaded dynamically into an ItemsControl through the code behind, whenever an instance of the control is created. The only hard-coded XAML is the declaration of the ItemsControl.
This can be a bit sluggish ...
Hello, first post here but I'm a frequent visitor =)
I have a WPF application with .NET 4.0 and Visual Studio 2010 which uses DataViews (coming from an SQL Server 2008). I have two tables which looks like this
Table1
GUID (Primary Key, UniqueIdentifier)
Table2_GUID (UniqueIdentifier)
Table2
GUID (Primary Key, UniqueIdentifier)
...
ViewModel has 2 field. Name, Childs
I need like this
1. When click on the root element, do 2 operation
first. expand yourself
second. select first child. If child element has childs, repeat 1.
otherwise do nothing
Only last child (leaf) selectable
...
Hello,
I have a XAML-object (window-control) having his own-properties in the code-behind (in my case it has a property called 'FirstEditableDate' without any UI-binding).
I also have another XAML-object (user-control) with a property (also without UI) and I want to bind the other property to this property.
So, if the property of the ...
I would like to do some processing of images in a WPF application. However, I would like to modify the pixels of a BitmapSource in memory at runtime.
I'm currently managing to do this using 'unsafe' code against an old fashioned System.Drawing.Bitmap and it works a treat (lock a working area, fiddle with the pixels) job done. The approa...
I bind a dataset to a datagrid wpf like this
DataSet d = Database.getBabies();
babies = d.Tables[0].DefaultView;
dataGridBabies.ItemsSource=babies;
Which is the best way to filter the data?(without running database query)
...
I have a WPF application that uses a custom window frame. My problem is that I cannot "unsnap" my maximized window with Aero Snap in Windows 7.
Properties of my window:
AllowsTransparency is set to true
WindowStyle is set to None
ResizeMode is set to CanResizeWithGrip.
I handle window drag movement like so:
private void TitleBarGri...
I'm attempting to create a WPF custom control that includes a reference to the unity container that has been created in the BootStrapper - e.g.
The reason being that I would like the custom control to be able to resolve the unity container to be able to use some of the services that have been registered to the container. e.g. a user pre...
I have a WPF application written in C#.
I have made a button. I changed the background color.
How can I change the bluish color when mouse is over my button? And how to control animation/change time?
...
I have a richtextbox control in my WPF 4.0 application. Now suppose I have a text like
"hello how [space][space] r u? [space][space] I am fine"
As can be noticed that there are two gaps between how and r as well as between ? and I.
When this will happen then the portion will be highlighted with green e.g. how ..r and from ? to I wil...
I wonder how do I check how much of a file has been uploaded/downloaded? I am using HttpWebRequest
...
If I use Application.LoadComponent() to load a UserControl, Page or Window, my application freezes when I try to close it.
The app apparently closes, but the process keeps running. Easy to notice when debugging.
I've tested it under Windows 7 64bit and Vista 32bit. In both cases I have used VS2008 and .NET 3.5.
A repro can be built by...
I've got a bit of an issue here where I want to modify GUI elements from various worker threads. Until today, the method I was using worked, but it was most likely very incorrect.
The simplest case involves my plugin's GUI, which does something in a worker thread, and when that method completes its work, it calls my callback. That cal...
hello,
i have a NavigationWindow that implements a wizard functionality, and a set of Page objects that represent the steps.
each Page uses a separate view model.
some of these view models spawn worker threads from their constructors. i terminate these threads when the view models are disposed of (they implement IDisposable).
further...
Hi,
How can I have a WPF style that has no target type ( one that can be applied to all objects) ?
<Style x:Key="Basic" TargetType="???">
<Setter Property="FontFamily" Value="Tahoma"/>
<Setter Property="FontSize" Value="12"/>
</Style>
I want to base all other styles on this "basic" style.
Regards,
MadSeb
...