wpf

WPF Binding ValidationRules in one line?

I have several one-line binding already written and I'd like to keep it that way if possible and if it still is humanly readable. Is there any way to rewrite this <TextBox.Text> <Binding Path="SomePath" NotifyOnValidationError="True" > <Binding.ValidationRules> <local:ValidationRule1></local:ValidationRule1> ...

[WPF] Why the assigned background cannot override setter value in style triggers?

i have a style for a textbox like this <Style x:Key="TextBox_Standard" TargetType="{x:Type TextBoxBase}" > <Setter Property="Control.FontFamily" Value="/#Calibri" /> <Setter Property="Control.FontSize" Value="12" /> <Setter Property="Control.Margin" Value="2" /> <Setter Property="Control.Height" Value="21" /> <Setter...

WPF:How can I create a popup image that overlaps a button?

I want to use a button which when the mouse enters the button a popup image is displayed. The complication is that the image will overlap the button and I want the image to remain visible until the mouse leaves either the button or the image. I've found that as the image overlaps the button I can't use the mouse leave event of the button...

How to get the background in setter?

how to get the background of a control in the setter. Eg. How to the get the Background of TextBox in the Setter? <Setter TargetName="Border" Property="Background" Value="{TemplateBinding Background}"/> This statement will give an error "Expression type is note valid style value". Is there any way to get the background property in th...

How to set the Table.Columns of a FlowDocument in a style

Hi I have multiple FlowDocuments, all of them have a table. All tables look the same. So I want to refactor the FlowDocuments. My initial document looks like: <FlowDocument xmlns=...> <Table> <Table.Columns> <TableColumn Width="12*" /> <TableColumn Width="1.5*" /> <TableColumn Width="2*" /> <TableColum...

Double Animation item detection

I'm currently writing a marquee control for WPF. The control consists of an ItemsControl, with TextBlock as the DataTemplate element of choice. The ItemsControl is the target of a Double Animation, which manipulates the Canvas.Left property. What I would like to do is create a "circular mode", which will allow the marquee to dynamicall...

When will the CanExcute event be raised by the CommandSource

Hi, When will the CanExecute event be ideally raised by the control that realizes the ICommandSource interface?? I tried to add a breakpoint to the handler to check when it is getting raised and it seems to be executed whenever the control is rendered on the screen. Can someone explain when exactly it will be raised and how to raise ...

wpf mvvm is it possible to have a listview with a list of objects, and below it a view containing the item selected

I have a listview, which displays a list of administrators, this list is held within a gridview, and each column has a edit button bound to the object. Below this I have a seperate view, which is used to edit/create new administrators, what I want to do is bind the controls of this view to the Administrator selected in the Listview when...

Resouce file share

i have a problem that i made eigth projects an dafter that i introduce another project in which i add the resource file. how i use the that resource file in other eight projects ...

Save and re-load the saved rdlc report.

Hi, I am developing an application in WPF in which I need to generate and show reports. I am using RDLC for generating and showing reports. The requirement for reports are Should generate and show report. The user should be able to save the report (they havent specified the format to save the report.) The user should be able to load a...

WPF Editable Combobox with DropDown list where in traversing thru dropdown items do not affect textbox

I have removed Drop Down button (toggle button) from the combobox template. To make it look like a TextBox with pop-up containing Items. If I type '10' then all matching data is populated and dropdown is opened with the data, e.g. data is: 10, 100, 1000. Now, if I press the 'DoWN' arrow then I want to traverse thru the list, 10,100,1...

WPF refresh TreeView when it loses the focus

Hi! I have a problem with my TreeView in a WPF application (Framework 3.5 SP1). It's a TreeVIew with 2 Levels of Data. I expand / collapse the items of the first level in a particular way (with a single mouse-click on the TreeViewItem). Again when I expand a first-level TreeViewItem, I add some second-level TreeViewItems to the group (it...

C# WPF Access 2000-2003 Files Creation

How can I create access 2000-2003 file using C# WPF and add tables in, data in and perform queries on it? I`m using MS Visual Studio 2010 this is what I`ve been able to accomplish: OleDbConnection conn = new OleDbConnection(); string myDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); strin...

How to set readonly on current cell in WPF Datagrid???

Hello Experts, How to set readonly on current cell in WPF Datagrid??? Thanks in Advance ...

how to define regions on an image

Hi all, I would like to define regions on an image. Let's assume that I have the map of USA as image and when the mouse hovers one of the states, the message box will prompt the name of the state. In flash, each states are sliced and defined as a region. How an image can be sliced in WPF? Thanks. ...

WPF program can't start with a hidden main window?

I have a WPF program that is auto run via an entry in the registry on user login. The program starts with its main window hidden, checks a few things and if the startup conditions are right, makes the main window visible, otherwise the program exits with status code 0. Sometimes when the program runs, windows will present a popup saying ...

How to exchange window content dynamically in WPF

Hey everybody! I need help on developing a WPF UI. I'm new to WPF. So far I read many tutorials and decided to follow a MVVM design pattern. What I want to accomplish might seem simple: There is a ComboBox at the beginning of a window. It's embedded in a Grid with two rows. Now I want the content of the second row to depend on the sele...

update daily ==> Clickonce or UAB(update application Block)

Hi for updating an application daily which one is better for a WPF application? clickonce or UAB? or more options? thanks of your attentions :) ...

Problem with navigation in a WPF application

I'm developing a WPF application where I have to navigate between different pages hosted in a Frame. I need also to keep alive the content of a page once created. In that way I can restore that content when I navigate again to it. I use the following handler to manage navigation: private object content = null; private void NavigateHand...

WPF Image : How to download Sourceimage with Proxy Server?

In my WPF Application I need to download some images from the internet. It's very easy I just set the URL as Source of the image control and that's all. But it's not working anymore when I run my application behind a proxy server! For a HttpWebRequest I can set a proxy server but it seems it is not possible for an Image control. Do I h...