Search Results

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

Page 102/239 | < Previous Page | 98 99 100 101 102 103 104 105 106 107 108 109  | Next Page >

  • How can I bind a LinkedList as ItemSource to ListView in WPF XAML?

    - by Jonas
    I'm learning WPF and would like to have a collection similar to a LinkedList, to where I can add and remove strings. And I want to have a ListView that listen to that collection with databinding. How can I do bind a simple list collection to a ListView in XAML? My idea (not working) is something like this: <Window ...> <Window.Resources> <LinkedList x:Key="myList"></LinkedList> <Window.Resources> <Grid> <ListView Height="100" HorizontalAlignment="Left" Margin="88,134,0,0" Name="listView1" VerticalAlignment="Top" Width="120" ItemsSource="{Binding Source={StaticResource myList}}"/> </Grid> </Window>

    Read the article

  • How to Add a Dynamic Layer to an Esri Map Control Programatically in WPF?

    - by Scott
    Just as the question asks. I have an Esri map control and want to add a Rastor image to the control in WPF and don't know how to do it. I see that I can add layers to the Map control, but is there a way to add a Raster image to a map control? I did find this code to turn the raster image into a Dynamic layer, but Im still lost on how to add a dynamic layer to the control it self. http://resources.esri.com/arcgisserver/apis/silverlight/index.cfm?fa=codeGalleryDetails&scriptID=16723 Thank you!

    Read the article

  • How to get the width of the whole text of the widget in WPF?

    - by macias
    Remarks Before I ask, let me focus on words: the length of "i" is 1 the length of "w" is 1 the render width of "w" is greater than "i" (except for monospace font) -- I am interested in this and from now on, I would simply write "width" The problem (small picture) Let's say I have incredible long text set for TextBlock widget which width is 100. And the text does not fit (the text is clipped -- i.e. only small portion of text is visible). The question is -- what is the width of the entire text (visible + not visible parts)? The background (big picture) I have a window width DataGrid (WPF standard) as main widget which contains text. I try to resize window and DataGrid in such way, that all texts will be visible without need of resizing and/or scrolling. I focus on width. The size of the window vs. size of the screen is not an issue, the text is so short that it would fit even on netbook screen.

    Read the article

  • How do I extend a WPF application using an addin-like architeture?

    - by Thiado de Arruda
    Lets say I have a WPF application that shows a ListBox with an ArrayList -populated with objects of arbitrary types- as a source, and this application is hosted in an assembly 'A'. By default the ListBox will display the custom object 'ToString' method return value. If a data template for that object type is found, the ListBox will use it for rendering. Imagine that theres another assembly 'B' that references of 'A' and seeks to extend it by providing custom data templates for certain types, to be used in that ListBox. Is there some way to do that without 'A'being aware of B?

    Read the article

  • How to color a mesh with values at the vertices in WPF 3D?

    - by Christo
    We've got a sphere which we want to display in 3D and color given a fuction that depends on spherical coordinates. The sphere was triangulated using a regular grid in (theta, phi), but this produced a lot of small triangles near the poles. In an attempt to reduce the number triangles at the poles, we've changed out mesh generation to produce more evenly sized triangles over the surface. The first triangulation method had the advantage that we could easily create a texture and drape it over the surface. It seems that in WPF it isn't possible to assign colors to vertices the way one would go about in OpenGL or Direct3D. With the second triangulation method it isn't apparent how to go about generating the texture and setting the texture coordinates, since the vertices aren't aligned to a grid anymore. Maybe it would be possible to create a linear texture containing a color for each vertex, but then how will that effect the coloring? Will it still render smoothly over the triangle surfaces as one would expect by applying per vertex coloring?

    Read the article

  • WPF Manipulation and Touch events not firing, but mouse events do?

    - by Smetad Anarkist
    I have a Samsung LD220Z multi touch monitor, and when I'm experimenting with some WPF and touch features the touch events arent firing. The mouse down event seems to be firing however. Does this mean that I have to take into account that not all touch screen behave the same, and how do I get the touch inputs on my screen? I've tried the Windows 7 Touch pack that microsoft released. And the multi touch features seems to work there. Any suggestion on how to proceed with this?

    Read the article

  • Should I use WPF or Windows Forms Application for my project in C#?

    - by RAJ K
    I am developing a Client-Server based application in which client application will access server database to store billing information. It will also have report generation facility. Windows Forms is good in document printing & I don't see such facility or controls in WPF. If I am wrong then please correct me. I want database security, which DB should I use, SQL Server, MySQL or Oracle. I would like to use free DB but security is my priority. Please suggest how I can implement a Client-Server architecture with multiple clients in C#? Thank you Geeks!!!

    Read the article

  • How to correctly bind an object to a WPF DataGrid?

    - by mbadawi23
    I'm trying to get a WPF DataGrid to work from a user control I'm building. Things seems to work fine. But I noticed this message in the Output window in the IDE: System.Windows.Data Error: 39 : BindingExpression path error: 'Name' property not found on 'object' ''Object' (HashCode=18165668)'. BindingExpression:Path=Name; DataItem='Object' (HashCode=18165668); target element is 'TextBlock' (Name=''); target property is 'Text' (type 'String') System.Windows.Data Error: 39 : BindingExpression path error: 'Department' property not found on 'object' ''Object' (HashCode=18165668)'. BindingExpression:Path=Name; DataItem='Object' (HashCode=18165668); target element is 'TextBlock' (Name=''); target property is 'Text' (type 'String')

    Read the article

  • Tiling rectangles seamlessly in WPF while maintaing subpixel accuracy?

    - by Jens
    I have had the problem described in the question Tiling rectangles seamlessly in WPF, but am not really happy with the answers given there. I am painting a bar chart by painting lots of rectangles right next to each other. Depending on the scale of the canvas containing them, there are small gaps visible between some of them as a result from sub-pixel rendering. I learned from the above question how to make my rectangles fit with the screen pixels, removing that effect. Unfortunately, my chart may display way more bars than there are pixels. Apart from the tiny gaps (which manifest as a periodic change in color saturation), this works well. If I snap each bar with the screen pixels, most of the bars vanish, though, so I am looking for another solution. Thanks in advance!

    Read the article

  • WPF MVVM: How do ViewModels communicate with each other?

    - by Dev1
    I have a View which has 2 sub views on it and a ViewModel is assigned to each view: ViewA - ViewModelA { ViewB - ViewModelB ViewC - ViewModelC } ViewB has a text box and ViewC has a combobox, both of which i need access from ViewModelA. Not the GUI control itself, but the bound value i.e. .Text of the textbox and .SelectedItem of the ComboBox. Currently i just have ViewModelB and ViewModelC as properties on ViewModelA but it feels wrong. What's the standard way for view models to communicate with each other without breaking the MVVM pattern? I'm completely new to WPF/MVVM.

    Read the article

  • wpf: How to keep an image stay in its original size?

    - by Martin Luo
    hi, guys! i have a problem about the image display in wpf. here's my code <Button HorizontalAlignment="Left" Grid.Column="1" Grid.Row="5" Margin="0,5"> <Button.Content> <StackPanel Orientation="Horizontal" Margin="10,0"> <Image Source="/images/user_add.png" Stretch="None" HorizontalAlignment="Center" VerticalAlignment="Center" Width="24" Height="24" /> <TextBlock Text="??" /> </StackPanel> </Button.Content> </Button> i hava the image with original size 32*32, but when i ran the above code, the image will stretch to fill all the space, beyond its original size, and i also set the "Stretch" property to "None", but it seems that it doesn't work. so, how can i fix this problem? thank u~~~!

    Read the article

  • Any idea about WPF ScrollViewer to make it smooth scroolling like Android?

    - by jimi
    I have trying a simple ScrollViewer in xaml like below: <ScrollViewer Height="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type StackPanel}}, Path=Height}" ScrollViewer.VerticalScrollBarVisibility="Visible" CanContentScroll="True"> <DockPanel> <StackPanel Name="StackPanel1" OverridesDefaultStyle="False" Width="230" Height="803" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="23,1,0,0"> ....Something here ....Something here ....Something here </StackPanel> </DockPanel> </ScrollViewer> But my question is..is it possible for us to create any smooth scrolling likes any android or iphone using WPF? Any ideas?

    Read the article

  • How do I write to command line from a WPF application?

    - by ben
    Hi I know how to write to console but if I write to console in my program and call my program from the command line it won't display anything. How do I make it so that when I say Console.WriteLine or Console.Out.Writeline ir prints to the command prompt from which it was called and not somewhere else? Once again I know how to do Console.WriteLine so it's not that :-p unless I'm doing it wrong. From what I can tell it's probably something to do with Console.SetOut(TextWriter t) this is a WPF application and I need it to post its data to the command line while still retaining the GUI at startup. I've triple checked and my code hits the print lines, I can actually see the lines being printed to the Visual Studio output window, it just won't display in the command line when I run it manually without VS. If possible I need to conditionally have the console display. ie if run from command line (or even with command arguments), display or post to the prompt, otherwise do not.

    Read the article

  • How should i draw text and shapes in wpf and C#?

    - by peterhu
    I want to do basic WPF graphics, i.e. rectangles, lines, circles and text. When should I use Drawing and when should I use a DrawingVisual? I have some code that uses Drawing and I render those to a DrawingImage and display that in an image control. Is this the right way? I could not see how to add text to a drawing. I had trouble positioning it too. Should I be rendering to a Canvas? I have some code that uses DrawingVisual and writes to a DrawingContext. That is like WinForms. Is this the recommended way? Do you have any high level advice on which APIs to use for basic graphics and labels? Will they options work on Silver Light and Desktop?

    Read the article

  • WPF Binding to Items within a collection? (or converter with parameters)

    - by Sonic Soul
    i am using a WPF DataGrid, and in my Details row, i would like to show separate objects within a sub collection of each grid item. Is it possible to have a finer control of Path? for example something like... Path=SubCollection['ItemX'] etc.. also, if i was to use a converter, i don't want to have to create a separate converter for each item.. so would there be a way to supply a parameter to a converter that could than determine which collection item to return??

    Read the article

  • Writing a custom wpf 'rolling' plot control (are there any components with such functionality?)

    - by adrin
    I need a wpf plot control that would 'roll' (scroll) as data is fed to it (instead of stretching, etc). Unfortunately i didnt find a working component so now I am considering writing my own control (its plotting features need to be simple). Did anyone write a custom plot/chart control? Is it difficult? What container should I use (Canvas & ViewBox?) so that it is reasonably fast, easy to write and scales as window is resized?

    Read the article

  • Why the data binding in this validation example works in WPF?

    - by MartyIX
    I'm wondering how exactly the XAML sample (MSDN sample) works: <Style x:Key="textBoxInError" TargetType="{x:Type TextBox}"> <Style.Triggers> <Trigger Property="Validation.HasError" Value="true"> <Setter Property="ToolTip" Value="{Binding RelativeSource={x:Static RelativeSource.Self}, Path=(Validation.Errors)[0].ErrorContent}"/> </Trigger> </Style.Triggers> </Style> Questions: (Validation.Errors)[0].ErrorContent - Is this code somehow checked by WPF? Because Validation.Errors may be an empty collection and in ordinary C# code this code may throw an exception. If this data-binding returns null for valid input - the null value is then casted to empty string (in a text control for example)? The index 0 corresponds to the first error message. How can I return more error messages from Validate method? Thank you for responses!

    Read the article

  • Make a WPF circular progress indicator / loading animation

    how to make a WPF circular progress indicator that resembles Silverlights loading animation  read moreBy Michael DetrasDid you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • WPF custom control derived from ComboBox that shows a Data

    Create a custom WPF control that derives from ComboBox and create a property where its value will be used as the content of the dropdown  read moreBy Michael DetrasDid you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • A Simple but Robust WPF Report Engine, Part 1

    a simple WPF report engine that is robust and one can use it in practical applications  read moreBy siyamand ayubiDid you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • EXIF Compare Utility using WPF

    The Exif Compare Utility is a WinDiff equivalent for image files that compares the Exif meta-data and displays the differences and similarities. The application is written using WPF and MVVM.

    Read the article

< Previous Page | 98 99 100 101 102 103 104 105 106 107 108 109  | Next Page >