wpf

Modify or 'tweak' an existing TreeViewItem control template?

Ok... this is sort of a two-parter here. (Sort of. May actually just be one. That's what I'm hoping anyway.) First, more generally, is it possible to target, via XAML only, a named item in a control's template? For instance, if a control's template has a ContentPresenter named 'PART_Foo' and we want to specifically set the Horizonta...

wpf animation fade in freeze and fade out

Hi I want to show some data on a form. The form should fade in for 5 sec and display data with full opacity for 10 sec and then start fade out in 3 sec. I have do this programatically in c#. Please give suggestions or sample code. Thanks Raju ...

How to reflect propertychange for an entity to ViewModal in WPF

I have an entity which inherits from INOTIFYPROPERTYCHANGED, this entity is bound to my UI elements like TextBOX. Now when any property is changed, my bindings are updated and everything works fine. What I want is to trap this propertychanged event in my viewmodal. my viewmodal also inherits from INOTIFYPROPERTYCHANGED. Entity public...

How to make wpf application as ole server

Hi, I would like to insert my wpf application in excel sheet just like an OLE object. Is it possible? If yes, how we can do this. In Excel 2003 when we click Insert->Object menu item, we get the 'Object' diloag. The 'Create New' tab of this dilaog contains varios OLE objects. I would like to display my DotNet exe application in this li...

How to Bind Grid with Properties in Code behind?

Hello All I have a grid in Xaml file and i want to generate its rowdefinition dynamically. to do that i create a List in which i added 3-4 rowdefinitions now i have to bind this property to the grid in xaml file. PLease suggess me how to do this. thanks Sher Singh ...

Dragging GridSplitter causes cell to grow when using Auto height/width

I am using a GridSplitter to resize a cell in a grid however its behaviour is not what I am expecting and I cannot find a solution. It is a grid of three rows, the first has a row definition set to Auto and contains some elements. The second row has some data in it and has a row definition of * to fill the remaining space. The last row i...

How to enable a button when a treeview-item has selected?

Hello, I have a treeview and a button. I want to disable the button (IsEnabled=false) when there is NO item selected in the treeview (and I want to enable the button when there is an item selected...). How can I do this???? Here is my Xaml. <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="...

showing transparent overlay on listbox

Hi There, we have a requirement where in , we need to have a list box, with some list items , assuming this would be my bottom layer , on top of this,we need a layer which shows up transparent element at some specified positions. i am on WPF 3.5. hope i am clear Thanks In Advance Deepak ...

Make DatePicker easier to read when disabled.

The text is grayed out when the DatePicker is disabled and I want the content to be easier to read. What I did on some TextBoxes was: <Style TargetType="TextBox"> <Style.Triggers> <Trigger Property="IsEnabled" Value="False"> <Setter Property="Foreground" Value="Black" /> </Trigger> ...

I need the Expand / Collapse for RowDetailsTemplate

I have wpfTolkit datagrid. He has DataGrid.RowDetailsTemplate I need to do the button when clicked it will Expand / Collapse. How to do this I could not find the event you want <Custom:DataGrid RowDetailsVisibilityMode="VisibleWhenSelected" SelectionMode="Extended" CanUserAddRows="False" CanUserDeleteRows="False" CanUserResizeRows="Fal...

Prevent image scaling on GridViewColumn entires?

Hi, I have a GridViewColumn created with the following XAML: <GridViewColumn Header="Validated" > <GridViewColumn.CellTemplate> <DataTemplate> <Image Source="{Binding Path=Validated, Converter={StaticResource imageConverter}}" /> </DataTemplate> </GridViewColumn.CellTemplate> </GridViewColumn> The images in the .png...

Stop highlighting selected item WPF ComboBox

Hi, I'm currently working on a WPF UI and I have a combobox on my window. So I want the user to be able to select an item from this combobox but when it is selected I don't want it to be highlighted in the default blue colour. I assume there is some way to stop this in XAML but I have not been able to find the solution so far. Thanks....

Assigning styles and templates programmatically

This is probably a newbie question :) I have some styles and content templates for a contextmenu defined in a window (alternatively I could move them to app.xml) The contextmenu is created programmatically so I need to assigned the style and content template to it programmatically (which is set to targettype contextmenu and menuitem). ...

How to begin storyboard based on ListBoxItem selection???

I encounter a problem that I cannot solve. I hope to find an answer here. I need a listbox to hide half way when a certain listboxitem is selected. I setup a storyboard with opacity mask animation which work fine in blend. My problem I cannot initiate BeginStoryboard. I tried numerous ways and no success. I need to hide the listbox to r...

Is there a WPF message box?

Is there a standard message box in WPF I should use, like WinForms System.Windows.MessageBox.Show()? ...or is it OK to use the WinForm message box? ...

once i add data to a row, a new row dynamically added in datagrid in WPF once i add data to a row How?

i found a problem adding a new row automatically in datagrid in WPF once i fill the data in the row and find same problem deleting the row automatically once i delete all its data ... could any one help me plz ? ...

Show window with progressbar while doing work.

Hi. Because I have a tool that needs to do a lot of work at one point, I want to show a window with some text and a progressbar while doing the work. My problem is, that because of the huge load of the work, the window never gets drawn or updated. I know that I usually should use an extra thread for the work, but I have to use 2 collec...

What is a current analog of COM technology?

COM technology seems a little outdated already, though still in use. But what approach is recommended now for implementing the same kind of interoperability when building a .NET app, specifically, in WPF? I.e. what is a modern replacement of a COM object? ...

WPF: Implicit Infragistics Ribbon Styling using BasedOn

Hello, I'm using the WPF infragistics ribbon and I'm trying to work off their styles using the BasedOn attribute. This work well when the x:Key is defined however in the case where I want to override the property on a border located inside an implicit style, what's the best way to do that without duplicating the entire style into my cust...

Datapicker in a datagrid non updating.Advice needed

Hi all I have a datagrid that is filled with and observablecollection Lets say I have 2 columns DataOfBirth (dataPicker) and Surname(textBox) This is using a mvvm pattern and the grid is mapped to the collection mentioned above. When changing the date or amending the surname it does not seem to pick up the changes? I cannot post the c...