I want to write a little application for myself to learn C# and WPF.
The typical hello world in 2009 (twitter client) seems boring. I would like to hear your stands should I do a twitter client? Any other starters I could play around with and get used to c#? (I'm a longtime PHP programmer)
...
I have an Expander in the ItemTemplate of a ListBox. Renders fine. The issue I have run into is that I would like the ListBox_SelectionChanged event to fire when the expander is expanded and/or selected. The MouseDown event does not seem to bubble up to the ListBox.
What I need is the SelectedIndex of the ListBox. Because the ListB...
How do I bind an element of a derived <UserControl> to an element of the base <UserControl>?
I have defined a UserControl called Tile as my base class. This would be an abstract base class, if XAML wouldn't balk when I tried to instantiate an object derived from it ...
Anyway, so far Tile only contains a single dependency property:...
Hi guys
Lets say I have the below:
<Style TargetType="{x:Type TextBox}">
<Setter Property="BorderThickness" Value="1" />
<Setter Property="BorderBrush" Value="Gray" />
<Style.Triggers>
<Trigger Property="IsFocused" Value="true">
<Setter Property="BorderBrush" Value="Green" />
<Setter Proper...
Just a simple question really, might be to simple really but hey here goes.
What makes WPF binding so powerful vs say Winforms databinding?
What are you likes and dislikes about it?
Any code example that show it's power would be cool.
...
Hi, I just need some quick help on syntax. I'm doing a WPF project and decided to try it out with Visual Basic. So, basically I'm trying to set the height of a row in a Grid.
I'm not great at programming but with C# I managed somehow to figure it out, without remembering how. It actually looks like an animation because when clicking the...
Hi guys
Just wondering if anyone know how to animate from one style to another i.e. going from NormalStyle to ActiveStyle when the user focuses on the textbox
<Style x:key="NormalStyle" TargetType="{x:Type TextBox}">
<Setter Property="BorderBrush" Value="Gray" />
<Setter Property="BorderThickness" Value="2" />
</Style>
<Style...
All I wanted to do is have a context menu on a button with the width bounded to the button's width. Apparently that's to much. If you open the context menu and then decrease the size of the button and open it again everything's OK (the width gets smaller). If you increase the width (from 100 to 200 for example) the context menu's width i...
Hi,
I have a piece of WPF/C# code that uses several Bindings:
A combobox is used to select an Account
The itemssource property of a second combobox is bound to the selected Account. This second combobox is used to select a Contact
The itemssource property of a grid is bound to the selected Account. This grid contains the selected Acco...
I need something to get the position of a sub-sub element relative to the container. TransformToAncestor does that. However, the element and subelements move, resize change, their layout, etc. I need a way to keep the position up-to-date. Like an event if anything happend that would affect my TransformToAncestor operation. Or an "Absolut...
I have a tabcontrol binded the an observable list. Eveything look to be perfect until I select a tab. Once selected, the tab doesn't lost its focus and the selected tab is not available. They are not any message in the Output Window.
Here is a screen shot just before clicking the tab:
And here is a screen shot after (with the problem...
I am learning c# right now and I figured it would be cool to rebuild something like Jing (just the screenshot part no video).
I am wondering how I create an overlay like this:
You click your mouse and the see through part it takes a picture of.
...
Hi,
I'm playing with the integrated spell check in WPF.
I need to configure it dynamically from code behind, not just in XAML. XAML solution works perfectly (SpellCheck.IsEnabled=true + xml:lang attribute).
However if I try to enable spell check using this code snippet, it is not working:
Thread.CurrentThread.CurrentCulture = new Cul...
Here's the Window declaration:
<Window
x:Class="Pse.ExperimentBase.SplashWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Style="{StaticResource _windowStyle}"
WindowStartupLocation="CenterScreen"
WindowStyle="None">
Here's the Styl...
Hi guys,
I am creating a custom control which does hit testing on its children. I'm planning on overriding the HitTestCore method to return multiple controls which fall inside or intersects with a Geometric region. Just wondering if anyone else has tried this. Do you have any pointers for me? Or is there another way which I can do this ...
I have a bunch of data points that I would like to two-way bind to points on a canvas.
The points assume larger y values are reflected in an upwards direction like most math graphs.
How do I change the x,y origin of the canvas to the bottom left corner and reverse it's interpretation of the y coordinate?
(I would like to stay in XAML)...
What's the best method in WPF for showing an Eggtimer/Busy mouse icon when opening a new window or retrieving records from a DB?
...
Hi,
I am hosting windowsforms control in WPF popup. Problems below:
If i make StaysOpen=False i can't interact with winform control. StaysOpen to false is required because when clicked outsidet the Popup region, it should close.
if i make StaysOpen=True i can interact with winform control but when i click outside the area of popup, it...
Hello all.
I need to develop a windows application with .NET 3.5 that needs to have a calendar and user can schedule appointments.
I want (not with a windows-service) that while the application is on, all the reminders that are set up for this user + reminders that admins set them up, should trigger an event in the application so I can...
I have an object that has a timer and it throws an event when the timer reaches to 5 minutes. In this event, I call a MessageBox.Show("Something") in my MainWindow.xaml.cs.
The problem is that when I call the MessageBox.Show(), the timer stops, until the user hits ok. And I need the timer to keep going even if the user hasn't clicked ok...