Hey there.
I'm trying to create an hyperlink that changes its text depending on a boolean value. I thought I could leverage the IsChecked method of a CheckBox. So I wrote this ControlTemplate for a CheckBox:
<CheckBox Checked="CheckBox_Checked" IsChecked="{Binding Path=SomeBool, Mode=TwoWay}">
<CheckBox.Template>
<Contro...
Having problems related to WPF WebBrowser not having a visual. Reason being, that it actually a wrapper around the winforms browser.
Anyways, I searched the web for any solution to this problem, and got hold of the following suggestions:
http://chriscavanagh.wordpress.com/2009/08/25/a-real-wpf-webbrowser/
http://rob.runtothehills.org/...
I'm looking to teach myself better methods of doing things in WPF that I would normally do manually.
In this case, I have a ViewBox with an image in it. I also have a button that uses a DoubleAnimation to rotate the image 90 to the right.
This animation works fine, but obviously because it's square as it turns, the image does a "best f...
i am developing an application in wpf using MVVM design pattern. i have a listbox when an item is slected then a dialog is open having the same record in editable mode. this dialog is binded with the selected item of the list. i have apply the validation rule for textbox using IDataErrorInfo. when the user update a record on dialogbox th...
I'm trying to add image tags to a WPF image and I'm not having much luck. I'd like to do it through databinding if at all possible. Can I set a resource with a DataTemplate to take care of this?
Here's what I've been playing with to no avail:
<Image Margin="25,4,14,46"
Name="MainImage"
Stretch="Uniform"
...
Is it still feasible to use the Current Multi-Touch frameworks .. Breeze, Multi-Touch Vista .. etc. While Native support for multi-touch in Windows 7 + .NET 4.0 and WPF ?
What are the advantages of using the mentioned frameworks over Windows 7 .Net 4.0 Transformation, Scale, Rotate Mechanisms ?
...
Hi,
I'm trying to manually fire a MouseLeftButtonDown event on a WPF control programmatically, as I am using the Microsoft Surface SDK, which does not fire MouseLeftButtonDown events, but ContactDown events. Basically I'm trying to push the MouseLeftButtonDown event down to the control, to fire off the correct behavior on the control, w...
Dear community.
I am almost done with implementing a printing functionality, but I am having trouble getting the last hurdle done with.
My problem is, that I am printing some reports, consisting of a header (with information about the person the report is about), a footer (with a page number) and the content in the middle, which is a F...
I have a wpf tabitem whose data context is set to my object 'Product'. All the controls on this form get their data from 'Product' object. I have a listview whose ItemsSource property is set to a list in my object 'Product.DetailsList'. Listview columns are bound to object properties in 'Product.DetailsList'
Up till here everything work...
Hi all,
I'm having some troubles trying to dynamically generate content in WPF and after it bind data.
I have the following scenario:
TabControl
- Dynamically generated TabItems through DataTemplate
- inside TabItems, I have dynamic content generated by DataTemplate that I wish to bind (ListBox).
The code follows:
::TabControl
<Ta...
I have a TabControl in the mainwindow of my app. I also Have a keyBinding for CTRL-TAB. However, whenever the TabControl is selected and CTRL-TAB is pressed the keybinding is not triggered because the TabControl handles the input and cycles through the tabs.
Is there any way that I can fix this?
...
I've run into a case where I have a custom Panel (inherits from Panel) and I'm using it as an ItemsPanel in a ListView.
When I resize the container that it's in, if I resize it smaller, my panel's MeasureOverride function gets called once, but if I resize it larger (let's say from 100 to 300), it calls MeasureOverride and ArrangeOverrid...
Hello, I am using visual studio 2010 on Windows 7 64bit.
I compiled and ran a simple application basically a thing a child could make.
Well the second it started to run, it froze my computer and rendered it unresponsive.
It continues to do this every time and for every application.
Any ideas why this is happening?
...
I am using .NET and am creating a desktop app/service that will display notifications in the corner of my Desktop when certain events are triggered. I don't want to use a regular Message Box b/c that would be too intrusive. I want notifications to slide into view and then fade out after a few seconds. I am thinking of something that will...
I have a background thread that generates a series of BitmapImage objects. Each time the background thread finishes generating a bitmap, I would like to show this bitmap to the user. The problem is figuring out how to pass the BitmapImage from the background thread to the UI thread.
This is an MVVM project, so my view has an Image eleme...
Hi all. I can't figure out the formula to compute the bank (roll) angle from the up and lookat vectors, though I feel this angle must be measured in tha plan normal to the lookat vector. Any hint appreciated. FYI I use WPF.
I have posted another question here, which is the same problem, but expressed only using math.
...
I have an existing OnPaint method which draws some shapes:
protected override void OnPaintBackground(PaintEventArgs e)
{
Graphics g = e.Graphics;
g.CompositingQuality = CompositingQuality.HighQuality;
Brush greenBrush = new SolidBrush(Color.FromArgb(73,172,113));
Brush blueBrush = new SolidBrush...
I have a ContextMenu and a ColumnHeaderStyle defined in Window.Resource section witch i use-it to a DataGrid ColumnHeader. My code is something like this:
<ContextMenu x:Key="cm_columnHeaderMenu"/>
<Style x:Key="DefaultColumnHeaderStyle" TargetType="{x:Type DataGridColumnHeader}">
<Setter Property="ContextMenu" Value="{StaticResour...
Here is my xaml that tells the collectionviewsource sort property name.
<CollectionViewSource Source="{Binding Contacts}" x:Key="contactsCollection" Filter="CollectionViewSource_Filter">
<CollectionViewSource.SortDescriptions>
<scm:SortDescription PropertyName="DisplayName" />
</CollectionViewSour...
Hi,
I'm doing a Surface Application.
And there I have something like a bulletin board where little cards with news on it are pinned on.
On click they shall fly out of the board and scale bigger.
My storyboard works well, except for the first time it runs. It's not a smooth animation then but it scales to its final size immediately and it...