Search Results

Search found 5961 results on 239 pages for 'wpf 4 5'.

Page 31/239 | < Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >

  • wpf: getting combobox value

    - by Martin
    I have a WPF ComboBox named cbFileSize. I try to get is selected value like so: string tmp = cbFileSize.SelectedValue.ToString(); MessageBox.Show(tmp); But tmp gets set to "System.Windows.Control.ComboBoxItem: 16". Which function should I use to just get the value "16"?

    Read the article

  • LineChart in WPF

    - by Maurizio Reginelli
    I havo to implement a custom control in WPF which contains a line chart. This control should permit to an user to define, with a control template, the number of grids, the font family and the font size of axis labels and other parameters. I'm wondering if one of you can address me to an example or give me some advice. Thank you in advance.

    Read the article

  • Playing audio files in WPF

    - by deepak
    hai i need to play audio files in WPF am using the following code FileTextBox.Text = selectedFileName; MediaPlayer mp = new MediaPlayer(); mp.Open(new Uri(selectedFileName, UriKind.Relative )); mp.Play(); its working well, but it doesnt plays the sound. why ???

    Read the article

  • WPF Documentviewerbase.Print. Remove dialog box

    - by Jim Beam
    I am using WPF and the DocumentViewer to display a document. However, when I use DocumentViewerBase.Print, it gives the "standard" Windows dialog box asking me to choose a printer with the default already selected. How can I get rid of this? I just want to use a Print method that will automatically start printing with no other prompt in between.

    Read the article

  • Any way to simulate MouseOver in WPF

    - by jpierson
    I'm working on a link control in WPF which fits the text with icon links case in the Windows UX Guide. What I want is to have some text within a hyperlink that appears to the right of some image. In my case I started off by using a TextBlock that contained a Hyperlink which then contained my image and some text. <TextBlock> <Hyperlink> <Rectangle Height="16" Width="16" Fill="{StaticResource MyIconBrush}" Stretch="UniformToFill" VerticalAlignment="Center" HorizontalAlignment="Left" /> <Run>My link text</Run> </Hyperlink> </TextBlock> The problem with this however was that the image being taller than my text produced an effect where the text was aligned to the bottom. Unfortunately I haven't found any way to control the vertical alignment within the TextBlock or within the Hyperlink so I've resorted to attempting an alternative layout where the Hyperlink and the Rectangle that represent my vector icon are separated in order to get them to align properly like shown below. <TextBlock> <Hyperlink> <StackPanel Orientation="Horizontal"> <Rectangle Height="16" Width="16" Fill="{StaticResource MyIconBrush}" Stretch="UniformToFill" VerticalAlignment="Center" HorizontalAlignment="Left" /> <TextBlock VerticalAlignment="Center"><Hyperlink>My link text<Hyperlink></TextBlock> </StackPanel> </Hyperlink> </TextBlock> The problem with this however is that now that my Icon and my Hyperlink are separated I don't get my MouseOver appearance of my link when I the mouse is over my icon and vise-versa. So this got me to thinking, how do I simulate MouseOver for a given control such with a checkbox where you get the MouseOver effect on the box when you actually mouse over it's associated text. I know in the HTML world the label element has a for attribute that can be used to specify which control it is labeling which will basically do what I'm looking for. Also I can imagine that in other scenarios it may be nice to have a label that when you mouse over shows a corresponding text box as if the mouse is over it and possibly when clicked focus is given to the corresponding text box as well. For now though I'm interested mainly in how to to get a label or label like element in WPF to act as a proxy for a given control in terms of it's MouseOver state. Also I would like to do this purely in XAML if possible.

    Read the article

  • WPF ToolBar: how to remove grip (dots on the left)

    - by Nike
    I use ToolBar for my WPF application. As I understand, there is no easy way to make it floating. I just want to remove element which I don't want to be displayed: several dots in the left side of ToolBar. Is there any Properties to customize view of ToolBar? Or, maybe, it's possible to redefine a ToolBar Template?

    Read the article

  • How to Clone Control in WPF ?

    - by Homam
    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 ?

    Read the article

  • Getting the right WPF dispatcher in a thread.

    - by Bert
    Hi, In the constructor of an object i need to create a WPF mediaElement object: m_videoMedia = new MediaElement(); but the class can also be instantiated from a other thread so i need to use Dispatcher.Invoke(DispatcherPriority.Normal, (Action)(() => { m_videoMedia = new MediaElement(); })); But how can I get the right dispatcher instance in that constructor :s

    Read the article

  • WPF Drag and drop to Datagrid

    - by ruben-monteiro
    Hi. I have been searching the internet high and low but can find some examples that can help me, I'm developing an application in wpf, in it I use a datagrid, each cell as a datatemplate with and image, in a mosaic style, on the side of the grid I have some tiles to use on the grid, I'm able to drag the tiles but can't drop then on the grid because I can't find the cell to which make the drop, is there a way to get a cell position from the the drag events? Thanks

    Read the article

  • WPF ListView Headers

    - by Kevin
    Hi everyone! I was wondering, Most wpf list view the header/columns are movable. Is it possible so that we can make them non-draggable or movable at all? does anyone know what this property is called by any chance? Thanks in advance!

    Read the article

  • WPF and routed event

    - by user109534
    I have a WPF window, which has a button that is inside a stackPanel, which is inside another stackPanel I wrote an event handler for the button for the MouseDown event. I want to execute this eventHandler three times for the button and the parent (stack panel) and the parent's parent How can I achieve that with the routed event, by writing only one event handler? I don't want to repeat the event handler code. Thanks

    Read the article

< Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >