wpf

Custom Extention for control properties

Hai guys I extended markupextention class to set the background property of controlls my code is public class OwnStyleExtension : MarkupExtension { public static System.Windows.Media.BrushConverter bc = new System.Windows.Media.BrushConverter(); public static Brush brush = (Brush)bc.ConvertFrom("#00FFFF"); public st...

Advanced combobox binding from code

Suppose I have a business object 'obj1' that has property 'P'. Let's also assume that I have a list of business objects: 'List<BussObj> list' and each BussObj object contains 2 properties: 'A' and 'B'. This list is bound to combobox: combobox.ItemsSource = list;. I would like to specify binding (in C# code) that would bind combobox.Se...

Navingating to an .html file in the assembly

I’m working with the WPF WebBrowser control to navigate to a html page hosting Silverlight. It seems I cannot use the NavigateToString or NavigateToStream method since I have Silverlight content. The html content loads fine but not Silverlight. So I think I’ll have to use the Navigate method which takes an Uri. Now I html page I’d like t...

Cannot add ToolTip in style

I'm trying to add a ToolTip to a Grid using a Style (as follows): <ResourceDictionary> <Style x:Key="ToolTipGrid" TargetType="{x:Type Grid}" x:Shared="False"> <Setter Property="ToolTip"> <Setter.Value> <ToolTip> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition /> <ColumnDefinition /> </Grid.Colu...

How can I display an image within the WPF Aero Glass Titlebar?

I have standard WPF Window that I have extended the Aero Glass on the top of the window around 50 pixels. I would like to keep the standard Min. Max. and Close buttons, Title Text and Window Icon. I would like to display a few small images (i.e. icons) in the title bar, around the middle of the title bar. How could I do this? WPF wi...

How i can recreate this effect 3D

Hi i been looking a webpage and i found out a a website with beautiful effect ,here is the link Beautifl effect I like recreate these multi layers of background and when the mouse move you see a beautiful, almost 3D, illusion going on. The shapes seem to move in a fluid like motion in 3D, a fake perspective illusion has been created. ...

Build server for WPF app - does Team City have an advantage over CruiseControl.NET?

First off: This is not meant to be an argumentative question or flamebait. I'm genuinely curious about this as I am about to start a build server evaluation process. Also, this question is not a general "which is the better build server" question. There are plenty of those on SO already. I'm wondering about a very specific aspect. The o...

creating a path in wpf programatically

I have a canvas with a bunch of textblocks spread over. Each Texbllock has differnt text in it. I need to wrap these textblocks with different shapes such as circle around one and ellipse around another and a decorative path around another etc. I am thinking of using a path in wpf to achieve this. If there is a way to attach a screenshot...

Issue uploading images for deep zoom

I have created a WPF application that basically converts a file from tiff/pdf to png and then dynamically splits the image into tiles then uploads them to the db. I am running into a problem where the 2nd level of tiles upload as black images...anybody see this before and maybe have an idea of what's going on? can post code if needed.....

WPF navigation via buttons

Question: Is there a way to make a button behave like a hyperlink inside of a user control? I've been searching around for a few days now and haven't found anyone who has addressed this. How do you use a button to navigate in a WPF application? Specifically how do you make a button inside of a user control navigate it's host frame? Ba...

Track "commands" send to WPF window by touchpad (Bamboo)

Hi, I just bought a touchpad wich allows drawing and using multitouch. The api is not supported fully by windows 7, so I have to rely on the build in config dialog. The basic features are working, so if I draw something in my WPF tool, and use both fingers to do a right click, I can e.g. change the color. What I want to do now is assig...

A good aproach to events in MVVM

So I ran into this problem trying to implement MVVM. AFAIK the best way to execute a method in the ViewModel class is through a CommandBinding. <Button Command={Binding DoSomethingCommand} /> Only this time I need to do something on a ListBoxItem double click, and the ListBoxItem doesn't implement ICommandSource. So I'm wondering what...

WPF showing dialog before main window.

How one can show dialog window (e.g. login / options etc.) before the main window? Here is what I tried (it apparently has once worked, but not anymore): XAML: <Application ... Startup="Application_Startup"> Application: public partial class App : Application { private void Application_Startup(object sender, StartupEventArg...

WPF RibbonComboBox text hints

I have the following RibbonComboBox in my XAML: <ribbon:RibbonComboBox Name="MyComboBox" SelectionChanged="MyComboBox_SelectionChanged" SelectedIndex="{Binding itemIndex, Mode=TwoWay}" ItemsSource="{Binding comboxBoxItemsSource}" /> The problem that I have is that sometimes the "comboBoxItemsSource" can change, thus the list of avail...

Use of internal FriendAccessAllowedAttribute in WPF

During a run through Reflector to find the root cause of a bug in a WPF application, I stumbled across an internal attribute FriendAccessAllowedAttribute that is littered across many different classes, members, etc. However, I'm unable to locate what exactly uses this attribute (if anything). My guess is this is part of the C++/CLI infra...

binding a command to a list

Hello I have the same command that I want to use for two controls on a dialog type window. As potentially interesting background, I'm using Josh Smith's ViewModel / RelayCommand ideas, since I am new to WPF and it's the first thing I've seen that I can actually understand from a big picture point of view. So the command is a property o...

WPF with GDI Memory growth problem

I am writing an app in WPF (C#) that plots certain types of fractals. The data sets are 3d points and need to represented as single pixels. The user can click and drag to rotate the plots The amount of points varies but can be quite large (five million plots or more). Currently I am drawing onto a System.Drawing.Bitmap using a Graphi...

How do I make my form transparent, but what I draw on it not?

I tried setting the opacity of my form to 50%, and then drawing a string on it. It seems that the string I draw on it also has an opacity of 50%. How would I draw a non transparent string , but let the form background show through 50%? Would also be willing to do this in WPF if it is possible, but I would need explicit instructions or a...

Wpf path increasing the width of the path

Hi I have an example of a path with its data. I would like to use this path as a template and be able to draw a larger path. I have noticed that the width or height of the path always returns NaN. Even though the actual size returns the width and height it has just a getter and no setter is available. Another example of what i am trying ...

find the center of a uielement in wpf.

How to find the center of a uielement in wpf. Thanks N ...