wpf

Web browser to WPF image drag and drop

Hi, I have a window set to allow drop and my Drop Event Handler is working fine for images dragged in from Windows Explorer. But dragging in pictures from a web browser has some quirks. In Firefox, I am only getting .bmp files with random names. Images from IE 8 (haven't tested others) only show a Not Allowed mouse cursor. I guess t...

WPF Button Visiblity

Hi All, I am using MVVM architecture to develop a WPF application... So far everything has been going fine. I have run into an issue with binding visiblity. I want to minimize writing code in the code behind if i can but if it's REQUIRED then I dont mind doing it. I have a ViewModel. THis model exposes a boolean and 2 commands. A con...

Exception: “Missing key value on ‘Storyboard’ object.” with styled triggers

I'm restyling a button, and that includes providing a controlTemplate and also adding some triggers (for mouseenter and mouseleave). My XAML is as follows: <Style TargetType="Button"> <Style.Resources> <Color x:Key="ForeColour" R="128" G="128" B="128" A="255"/> <Color x:Key="BackColour" R="211" G="211" B="211" A="...

Getting around the WPF rendering bottleneck

I love to make efficient apps and often look to concurrency and multithreading to improve application responsiveness and such, but lately my attempts always seem to be blocked by WPF's single-threadedness. No matter how efficient and parallel my code is, WPF seems to continually stall my UI and make my app look incredibly unresponsive--s...

Using storyboard animations for mouseover and selection in WPF ListBoxItems

I've got a WPF app that has a listbox which I'm trying to apply some mouseover effects to. It all works fine when I use simple Setters to change the background color on mouseover/selection, but I figured it would look nicer if it animated between states, so I switched the Setters for enter/exit Storyboards. It all works nicely initially ...

Calendar control, change a day background colour on click.

I have an extended Calendar control that is bound to a class containing a date and state values. The idea is essentially differentiate between national holidays, state holidays, and personal days off. I render these in different colours using a Converter that inspects the current date against the list of objects associated with the calen...

XAML code re-use (boolean to image binding)

I'd like to be able to reuse this XAML rather than making a copy and changing the binding path. What's the solution for this? I'm want to display a tick or cross for a boolean column in a data grid. <Image> <Image.Style> <Style TargetType="{x:Type Image}"> <Style.Triggers> <DataTrigger Binding="...

How can I change the selection in an unfocused textbox?

I have seen this question: http://stackoverflow.com/questions/642498/how-to-keep-wpf-textbox-selection-when-not-focused And have implemented the solution there, so that my textbox shows the selection, even when it does not have focus. However, when I change the selection start or length, nothing changes visually in the textbox. Also, ...

Implementing WPF Snap Grid

I am trying to implement a snap grid using WPF and a canvas. I am thinking my math is off because the UIElement won't snap to the grid in the background. Below is the xaml I use to create the grid and the method I use to try and snap the UIElement to the closest grid line. The method used is fired as soon as the mouse button up event ...

Any FREE 3D Carousel control available?

Is there free 3d carousel control available? ...

Creating of Menus in WPF Silverlight Application with Visual Studio 2010

Dear All, I want to make a Student Management Software using WCF (Visual Studio 2010). I have not made any projects in .NET. I need a lot of Master Screens, Transaction Screens, Reports and so on. How do i go on with this. Is it possible to create menus in WPF and i can create all my options [Student Master, Course Master etc.] in Menus...

WPF Polygon to bitmap

How to convert the wpf polygon shape as bitmap image. am tryint to send as Visual parameter to change as bitmap, but it doesnt seems to be working. is there any other way to convert the WPF polygon to bitmap???? am using like below RenderTargetBitmap RTbmap = new RenderTargetBitmap((int)yellowPolygon.Width, (int)yellowPolygon....

WPF Docking library error?

hello I use DockingLibrary : http://www.codeproject.com/KB/WPF/WPFdockinglib.aspx but when I want to dock dockablecontent in the center(just in the center) of dockmanager an error raise: object reference not set to an instance of an object note: I use VS2010. what can I do to solve this? ...

WPF Data grid Text Ellipsis Not working...

Hello, I have a column with long user comments. I load it using following code... <my:DataGridTextColumn Header="Message" Binding="{Binding UserMessage, Mode=OneWay}" CanUserSort="True"> <my:DataGridTextColumn.ElementStyle> <Style TargetType="{x:Type TextBlock}" ...

DataBinding Problem In ContentTemplate of a TabControl

Hi, I am in a trouble with databinding of the tabControl's Content Template. I have that class public class MainWindowViewModel : INotifyPropertyChanged { string _text1 = "text1"; string _text2 = "text2"; string _text3 = "text3"; public string Text1 { get { ...

How to create ListBoxItem within behind code

Hi there, For some reason I have to initialize the ListBox items in behind code, the reason is too complication to tell. The LoadFamily() is called during WPF UserControl show up. public void LoadFamily() { DataTemplate listItemTemplate = this.FindResource("ManDataTemplate") as DataTemplate; foreach (Person man in family) ...

WPF changing Background of a label within UserControl using DependencyProperty

Hi. I have a very simple UserControl as shown below. I'm trying to get the background of the Label element to change whenever a property in the control changes, but it's not working: when I change the Selected property on the control instance, the label's background color does not change. Thanks! Code behind: public static readon...

How to make a RibbonSplitButton open its dropdown list when clicked?

I'm using RibbonSplitButton of the Microsoft Ribbon for WPF and want to open its dropdown when clicked. I tried to catched the clicked button and set IsDropDownOpen=true but the dropdown open then close immediately. How can I retain the dropdown open? Please help! (Or show me where the correct forum to post this, thank you!) Nam. [...

open window from xaml

Hi guys, Is there any way to write the ShowDialog window method (e.g. driversWindow.ShowDialog();) via Xaml? I want that pressing a button will open a dialog window define in the Xaml code Thanks Eran ...

How to get the Elements defined under Control Template in runtime in WPF

How to get the Elements defined under Control Template in runtime in WPF ...