wpf

Showing items as images in a WPF ListView

So I have binded a List to a ListView where the List has items of type Album, where it has lots of properties including .Cover, which I is an image on disk. Well since I don't know what type of image is needed and how they have to be loaded (I only know using Image types for Winforms), I don't know the type yet. Can someone show or post...

How to deal with JavaScript when trying to fetch web page in C#.NET/WPF?

The .NET WebClient class is nice and all, but it doesn't parse the JavaScript in the page. What I mean is, sometimes a page is forwarded to a different page via JavaScript, or sometimes DOM elements get added to the page via JavaScript with an onload event. I need to deal with both of these situations. What can I do to deal with this?...

Storing entity in XML, using MVVM to read/write in WPF Application

Say I've a class (model) called Instance with Properties DatbaseHostname, AccessManagerHostname, DatabaseUsername and DatabasePassword public class Instance { private string _DatabaseHostname; public string DatabaseHostname { get { return _DatabaseHostname; } set { _DatabaseHostname = value; } } priv...

How to Clone Control in WPF ?

Hi, I want to clone a WPF Control (XamDataGrid) I know these ways: Clone Problem: Control is not Cloneable Serialize & Deserialize in binary format Problem: Control is not serializable Serialize as XML Problem: control contains images and Images are not serializable in xml serialization Do you have any valid workarounds ? ...

Why do so many wpf controls implement CLR properties instead of dependency properties ?

Hello, is it because the controls programmers are lazy, too hard to implement or not knowledgeable? Wether they are custom controls from 3rd party vendors or Microsoft itself, very much controls have often clr properties instead of DP. Result is I can not bind to them and is wpf not all about binding? :/ My next side question would be...

Adding an Image to ListView in WPF like this ... ?

I'm gonna create a ListView in WPF like the below image http://www.picfront.org/d/7xuv I mean I wanna add an image beside of Gravatar label within Name column. Would it be OK if you guided me ? Edit: The image is output of a method. The method makes the image from a base-64 string. ...

Setting properties of auto-generated listboxitem

I am trying to set the inputbindings of the auto-generated ListBoxItems of a databound ListBox. The code below does not work. The compiler complains that "The Property Setter 'InputBindings' cannot be set because it does not have an accessible set accessor." What is the correct syntax to set the InputBindings? <ListBox.ItemContainer...

Horizonatal Scrolling in FlowDocumentScrollViewer

I have a flow document with images (created from drawings). I have provided a button for the user to enlarge the images (zoom) independently without zooming the text. Is there anyway, I can force the FlowDocumentScrollViewer to display a horizontal scrollbar for scrolling when the images are enlarged? Currently, the enlarged images are ...

Borderless ImageButtons in WrapPanel

I am attempting to create a WrapPanel with seamless ImageButtons containing Artwork. I put together the following ContentTemplate in the hopes that it would provide the seamless look required; however a thin white-line remained around each of the buttons. Can anyone steer me in the right direction? <Button.ContentTemplate> <DataTe...

How do I use standard Windows warning/error icons in my WPF app?

I'm making a custom error dialog in my WPF app and I want to use a standard windows error icon. Can I get the OS-specific icon from WPF? If not, does anyone know where to get .pngs with transparency of them? Or know where in Windows to go extract them from? So far my searches have turned up nothing. ...

Webcam streaming in a WPF application

I noticed few similar questions already, but didn't find exatly what I want. I'm trying to do the following. Have a client and server Webcam application. Server application is on a PC with a webcam connected to it and it streams the webcam output. Client application connects to a Server and shows the webcam video. What's the best and e...

WPF Binding a visual brush's visual to a different window.

I need a rectangle in my settings window to display a scaled down version of of the main window. This is the non-working code that I have right now. Is it possible to do what I want to do? <Rectangle.Fill> <VisualBrush Stretch="Uniform" Visual="{Binding ElementName=local:MainWindow}" /> </Rectangle.Fill> ...

WPF: Once I set a property in code, it ignores XAML binding forever more... how do I prevent that?

I have a button that has a datatrigger that is used to disable the button if a certain property is not set to true: <Button Name="ExtendButton" Click="ExtendButton_Click" Margin="0,0,0,8"> <Button.Style> <Style> <Style.Triggers> <DataTrigger Binding="{Binding IsConnected}" Value="False"> ...

How to have ListView items with Label show up at the bottom of the item not to the right in WPF?

I am using a WrapPanel with an Image and Label, but the Label shows up to the right of the item. How can I make it show up at the bottom of the Image/Item? <Window.Resources> <DataTemplate x:Key="ItemTemplate"> <WrapPanel Orientation="Horizontal"> <Image Width="50" Height="50" Stretch="Fill" Source="{Binding Cove...

WrapPanel doesn't wrap in WPF ListView

I am using a ListView with an ItemTemplate like this: <Window.Resources> <DataTemplate x:Key="ItemTemplate"> <WrapPanel Orientation="Horizontal"> <Image Width="50" Height="50" Stretch="Fill" Source="{Binding Cover}"/> <Label Content="{Binding Title}" /> </WrapPanel> </DataTemplate> </Windo...

How to cancel the vertical scroll automaticlly changed

Hi I have ListBox with Expander as a ListBoxItem, and i have some checkbox and ComboBox within Expander, I placed the ListBox within the ScrollBar. problem: For example ListBox have 10 ExpanderItem, When i expand any one of the Expander then Vertical Scroll viewer will display. now i scroll the Vertical ScrollBar to below for see a...

User Control inherit from ListBox in Wpf?

Hi. I want to make a user Control in WPf with same properties and events like ListBox.(can add items , remove them , selecting ,...) on way in windows App is use a user control which is inherit form ListBox. but in WPF I don't know how make User Control inherit from ListBox (or other WPF Control)!!! I write this code but it had an exc...

MVC patterns with WPF + NHibernate + IoC

I'm looking for patterns and principles for using with WPF and NHibernate in model-view-controller style. ...

Silverlight 3 Binding to the Current Item in a Collection

The Binding syntax, {Binding /}, works in WPF but does not work at all in Silverlight 3: <ContentControl Content="{Binding MyCollection}"> <ContentControl.ContentTemplate> <DataTemplate> <ContentControl Content="{Binding /}" /> </DataTemplate> </ContentControl.ContentTemplate> </ContentControl> What...

Free Excel spreadsheet Component for SilverLight?

I Need a Good Excel spreadsheet Component for Silver Light. I mean Free ones!!! ...