I really wonder what I can put in the ViewModel.
If its needed to be tested might some say...
But when the properties like CaretPosition (to get the selected Text) are no dependency
properties, then better forget about the ViewModel.
At the moment I have this in the codebehind:
private void rtbContent_SelectionChanged(object sende...
When I enter text using the keyboard, I see that the conclusion of characters in the editor window, a little behind the keystrokes, it do inconvenience in my work, how make that characters appear simultaneously with pressing keys.
...
My WPF UserControl contains two stack panels and each of them contains labels, text boxes and radio buttons.
I would like to set VerticalAlignment property to Center to all controls in my UserControl with as little code as possible.
Now I have following solutions:
brute force - put VerticalAlignment="Center" in each control
define o...
I am using a dependency property to show a window, on double click of an item.
not sure whether it is a specific bug with WPF or I am doing something wrong.
If I double click even on the scroll bar or on the column headers.It triggers the double click command.
have tried a solution at ths link
http://stackoverflow.com/questions/2485...
Hi,
I'm currently writing in C# wpf and I would like to imitate the action of clicking a button by the user pressing a key.
private void abuttonispressed(object sender, System.Windows.Input.KeyEventArgs e)
{
if ((Keyboard.Modifiers == ModifierKeys.Control) && (e.Key == Key.S))
{...
I have a WPF ListView , where I bind an observable collection, and below is the code
<ListView Name="WOListView" IsSynchronizedWithCurrentItem="True"
DataContext="{Binding AllItems}"
ItemsSource="{Binding }"
SnapsToDevicePixels="True" Grid.IsSha...
What are your ideas for designing backgammon board using WPF?
may i use picture for board background?
how about nuts?
thanks all.
...
Hey Guys, I'm trying to generate a bitmap off a WPF border. The whole thing sits in a asp.net app (server side of course) running .net 4.0.
The problem is, that the generated image is, well, empty. Does anyone have an idea why?
Here's the code.
public static byte[] Draw(int width, int height)
{
MemoryStream memoryStream
...
I need not:
sorting
filtering
grouping
column headers
row headers
I need:
Just 7 buttons(each a weekday) over the data matrix data
Scrollable data matrix
editable
row AND columns resizeable
I decided to choose this:
A Scrollviewer with a Grid with several Gridsplitter and a Itemscontrol.
Implement IEditableObject into my ViewMo...
Well
this is a really simple question, the search tearms are just not that great.
How do I check in some library if I am currently running as a console application, vs. a WPF window application?
Thanks for any tips,
Chris
...
hi please can you help me - i need to detect transparent pixels - thanks in advance.
i use wpf and class image.
...
I'm just starting out with WPF + C# in Visual Studio 2010.
I've added the standard calendar control to my project, and I want to disable/remove the month left & right buttons.
I couldn't achieve this using the properties of the control, so I did a bit of research - it sounds like I'll have to replace the standard template with a modifi...
I am trying to do some WPF programming for the first time, and so I'm running through some tutorials. I am using Visual C# Express 2008. I am able to modify the application using the design view and the XAML view. I can also add events by double-clicking on the controls in the design view, and I can see these events being added to the C#...
I have a WPF application with ListBox that display list of items.
Each item has IsChecked property.
I have change the style of the ItemContainerStyle of the list box as follos:
<Style x:Key="OrgListItemStyle" TargetType="ListBoxItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="VerticalCon...
Hello,
in procedural code in can do the following:
// Add two event handler for the button click event
button1.Click += new RoutedEventHandler(button1_Click_1);
button1.Click += new RoutedEventHandler(button1_Click_2);
But how can I add multiple event handlers for the button's click event in XAML?
Thanks for any hint!
...
Hi,
I currently have a listbox in wpf c# and added some keybindings to the keydown event handler of my main window. It's event handlers for the spacebar and the up/down keys. However, when my listbox has focus, these bindings are not initiated. How can I disable these default keybindings (without entering a e.handle = true so the entire...
Where do i get the ISynchronizeInvoke so i can sync against UI thread?
System.Timers.Timer gTimer;
gTimer.SynchronizingObject;
...
Here is, roughly, what I'm trying to achieve:
The green part is fixed.
Cells in the orange (or pink?) part are editable.
Cells in the blue part are also editable.
The [add fridge] button adds another column.
Now the tricky part:
The blue+green parts should, together, be scrollable vertically.
The blue+orange parts should, together, b...
Simplified problem.
I have two ItemsControls that are located one under another and are bound to the same sequence:
[Control] [Another Control] [More Controls]
[Other Ctrl] [Super Control] [Control]
What I would like to do is align their sizes such that they appear to be a single table:
[Control ] [Another Control] [More Controls]...
I am trying to add flip animation between two UIElements(Image/Page).I am trying to do flipping affect on the UIElement Horizontally by keeping the UIElement at the fixed Place(I mean by staying at origin(0,0,0) position ).The issue that I am having the idea about 2D animation only and I did this task using 3D Animation but in 2D it seem...