wpf

Problem with SIngle and Double click events in canvas

Hi, I have a Canvas which is present in a usercontrol, I have attached the DoubleClick event to this user control like this mainWindow.CanvasLayout.MouseDoubleClick += new MouseButtonEventHandler(CanvasLayout_MouseDoubleClick); I am usign this event handler to achieve fullscreen functionality. Now, canvas can have various controls...

WPF Toolkit Accordion - How To Data Bind

Hi I have been trying (and failing) to dynamically create an accordion using databinding. I have a collection called MenuGroups, which contains a string 'ModuleName' and an IList collection called MenuItems. I wish to bind the MenuGroups to the headers and the MenuItems to the content. The closest I have managed so far uses this XAML:...

WPF:How Can Get the position of image which in ListView Item ?

ListViewItem Contain one thumbnail, when the mouse over the thumbnail,I want to show a big Image, the center should equal between thumbnail and big image, any suggestion? sorry about my poor English, there is a photo about my idea, maybe you can see what I said: http://farm5.static.flickr.com/4100/4788840950_7d952a384c_b.jpg ...

Entity Framework getting attribute/value pairs.

I'm working with an existing database, utilizing the Entity Framework for dynamic query builder. This is a key factor here. I don't know what types of objects I'll be working with until runtime, as the user is allowed to select which objects/properties they want with the query builder... So I'm using ObjectQuery<EntityObject>. Everythin...

WPF desinger error.

Hello All, I'm getting the following error when I select a new WPF project. Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401) at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ...

inherit WPF window, why i can not see the Parent's buttons in the child's window

hi, i have a base WPF window and a second WPF window which derived from it. if i add new items to the child's window, i can not see the buttons that derived from the base window anymore. anyone? idea??? thanx! tali ...

Tooltip in Datagrid, added from code-behind

I'm new to wpf and im having trouble adding tooltips to my datagrid header from code-behind. I need to use autogeneratecolumns on the datagrid which rules out xaml editing. All examples i could find involved som xaml editing. I've tried to add it the DataGridTextColumn without succeding private void dataGrid1_AutoGeneratedColumns(obje...

Apply style from the database field in WPF.......

hi, my problem is, i have different-different styles which are stored in database table. i will fetch this styles and store it into some string variable.now i want to apply this styles into my wpf controls. so how can i do that? ex: My Code is.. Window1.xaml =========================== <Window x:Class="DynamicBindResourceDictiona...

Wrappanel and scrollviewer problem

Hi, I need to display buttons in which user can use to add controls. Buttons are categorized in groups. Here is the XAML I am having - <ScrollViewer VerticalScrollBarVisibility="Auto"> <GroupBox Name="maingroup" Header="Click To Add Controls" BorderBrush="Transparent"> <Grid> <Grid.Ro...

C# Read/Write into Access DB File

I want to write into Access Database File using C# Application, probably using WPF ... I also want the file to be password protected ... is it possible to connect to it while it is password protected or should I remove the password? ...

MVVM question, Event fire in the View

Hi All, I am new in MVVM and WPF. so be easy with me. I have a model (model A) in MVVM, in the ViewModel I have a collection. The collection is present in the View as ListView. I have another model (model B - not ui model) that need to do something every time that the listview is changing. How can I alert model B on the selection chan...

i want to convert speech to text in WPF . How can i do this ??

i want to convert speech to text in WPF . How can i do this ?? I m new in this please guide me ?? How can i start my project ?? ...

Can't bind value to combobox in wpf

I have a control,where is combox. I bind to it properties from modelview. I can bind properties to textboxes, but not to combobox. Value from modelview is 4. Anyone know why is that ? <ComboBox HorizontalAlignment="Left" VerticalAlignment="Top" SelectedItem="{Binding Path=QuantityOfStars}"> <ComboB...

Create WPF window's object at runtime.

I have a function with one string parameter. Parameter is the name of existing wpf Window's name. Now i want to create a instance of window by string parameter and want to call Show() function of that window. ...

The best WPF4 Project on CodePlex.com

I'm learning this days about WPF and the amazing tool from Microsoft wich named "Expression Blend 4". It makes our work easier than ever to design our WPF and Silverlight apps,Particularly impressive to me is the SketchFlow feature, which enables rapid prototyping for our WPF and Silverlight applications.Meanwhile the ability to creat r...

WPF: trigger to check if TabControl has only 1 tab!

Is there any trigger I can create to see if a Tabcontrol has only one TabItem. In these cases I actually have a TabItem collection in the codebehind wich I could possibly use a count method on. In the case of only one tab I wan't to hide the TabPanel. Can I just call visibility=collapse on it? ...

Creating a scrolling view with a textBox

Hi, I'm trying to implement scrolling functionality in a textBox, so that I'm only displaying as many lines as will fit on the viewable part of the textbox and discarding any other lines. I have tried getting actualHeight and dividing it by the fontsize but this gives a line count which is too high so I display too many lines and the ...

WPF Label adapt FontSize to it's Width and Height

Hi all, I need to develop a Label control in WPF, on .net 3.5 and VisualStudio 2010, which FontSize automatically makes the text fill the control area. I dont know if create a CustomControl inheriting from label or create a UserControl which contains a Label control. I've seen an example here using a ValueConverter, but I'am not under...

Rich WPF FocusVisualStyle.

Does anyone have a rich FocusVisualStyle to share? I am looking for something like the Silverlight 4 one or Google TextBoxes in Chrome or like Visual Studio 2010. Examples: ...

this.dragmove() interfering with mouseup event wpf

Hi. I have a UserControl in WPF. The UserControl has a MouseLeftMouseButtonUp event. The problem is- the Window has a this.DragMove() method in its MouseDown event which seems to interfere with the MouseLeftMouseButtonUp in the User Control (I need the this.DragMove() method to move the borderless window). Any ideas? Thanks! ...