WPF listbox image binding

Good morning,
I already implemented a application that loads images from a directory to a listbox. All ok but the loading takes about 5 seconds to display around 20-30 images. Is there a way to decrease the time needed for the images to be loaded. Or is it correct to
display an loading image in front of the UI so the user knows images are loading? Thank you in advance for the help. Below is my xaml code for the listbox.
<ListBox Name="Images" ListBox.SelectionChanged="lstImagesChange_Click" Grid.Column="1"
ScrollViewer.HorizontalScrollBarVisibility="Disabled" VirtualizingStackPanel.IsVirtualizing="false"
VirtualizingStackPanel.VirtualizationMode="Recycling" ScrollViewer.IsDeferredScrollingEnabled="True">
<ListBox.Resources>
<Style x:Key="{x:Type ScrollBar}" TargetType="{x:Type ScrollBar}">
<Style.Triggers>
<Trigger Property="Orientation" Value="Vertical">
<Setter Property="Width" Value="20"/>
<Setter Property="Height" Value="Auto" />
</Trigger>
</Style.Triggers>
</Style>
</ListBox.Resources>
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel IsItemsHost="True" Orientation="Horizontal" FlowDirection="LeftToRight" />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<Border BorderThickness="2" BorderBrush="#bb62d8" Background="Black" Width="200" Height="200" Margin="5,5,10,5" CornerRadius="10">
<Image Source="{Binding Path=Path, Converter={StaticResource UriToBitmapConverter}}" Tag="{Binding ImageID}" />
</Border>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
and below is the code loading the images
if (!(images == null))
Images.ItemsSource = images;

Hmm, so are your images really 150x150 or are they larger than that?
Anyway, here's one solution to show a "loading" image and not block the UI while all images are loading. You seem to already have some class with a Path property which you use as image Source. Let's say ImageItem
public class ImageItem : INotifyPropertyChanged
private static ImageSource loadingImage;
private ImageSource image;
private Task loadingTask;
private string path;
public string Path
get { return path; }
set { path = value; }
public ImageSource Image {
get {
if (image == null) {
if (loadingTask == null) {
                    if (loadingImage == null)
                        loadingImage = new BitmapImage(new Uri("loading.png", UriKind.Relative));
                     image = loadingImage;
loadingTask = Task.Run<BitmapImage>(() => {
var bi = new BitmapImage();
bi.BeginInit();
bi.DecodePixelWidth = 64;
bi.CacheOption = BitmapCacheOption.OnLoad;
bi.UriSource = new Uri(path);
bi.EndInit();
bi.Freeze();
return bi;
}).ContinueWith(t => {
Image = t.Result;
loadingTask = null;
}, TaskScheduler.FromCurrentSynchronizationContext());
return image;
private set {
if (image == value)
return;
image = value;
OnPropertyChanged("Image");
private void OnPropertyChanged(string propertyName)
if (PropertyChanged != null)
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
public event PropertyChangedEventHandler PropertyChanged;
In summary:
there's a new Image property, bind Image.Source to that instead of Path
when the Image property is read for the first time it will start a task which loads the actual image and return loadingImage instead of the real image
when the loading task completes it will set the Image property to the loaded image. This will raise a property changed notification that will update the Image control in the UI.
of course, the converter is no longer needed
"loading.png" must be part of the project and in the same folder as the XAML file
Caveats:
This works well for a relatively small number of images like 20-30. For more images you'd really need a WrapPanel that supports virtualization, that would allow images to be loaded as the user scrolls through the list. Without virtualization all images will
be loaded and even if the UI doesn't lock up you'll saturate the CPU for a long time with so many tasks.

Similar Messages

  • Agentry - WPF Background Image

    I am using the Agentry WPF client v7 with SMP3.  I am also using the Agentry editor v7 to develop the application.  I am trying to add a background image to a detail screen for the WPF client.  I have targeted the Windows 1024x768 platform and selected the appropriate background image.  The screen appears correctly in the screen preview in the Agentry editor.  However, when I run the app in the Agentry WPF client the background shows up as all white and the background image does not display.  Can anyone think of what I could be doing wrong?

    You aren't doing anything wrong, it is just that the WPF client does not yet support background images.  That feature just hasn't been implemented yet on the WPF client.
    Sorry,
    --Bill

  • List the FaceBook NewsFeed in Wpf ListBox

    Hi,
    i am developing a facebook application using WPF using Facebook.dll
    i can find example for reading friends list. can any one help me how to 
    read the News Feed for the person who login.
    Thank you

    Ask on http://stackoverflow.com/questions/tagged/facebook*. WPF does not help you on this.
    Visual C++ MVP
    Hi Alex,
    As Jiang suggested, for your question, please contact with their official support to get better answer.
    Thank you for your understanding.
    Best Regards,
    Franklin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Resizing the Images parsed from XML feed and binding to Listbox...

    Hii..
    I have downloaded the xml feed and parsed images from feed. Binded them to listbox and displyaed in a listview.Using the below code
    XAML code:
     <Grid x:Name="ContentPanel" Margin="12,163,12,10" Grid.RowSpan="2"  >
     <ListBox x:Name="moviesList"
                    SelectionChanged="moviesList_SelectionChanged">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <Border x:Name="brdTest" BorderBrush="Gray" BorderThickness="0,1,0,1" Height="360" Width="500">
                                <Grid Height="350" Width="300">
      <Image delay:LowProfileImageLoader.UriSource="{Binding MovieImage}" 
                                     HorizontalAlignment="Center" 
                                       Margin="-30,0,0,30"/>
                                    <StackPanel Margin="30,280,10,-20"
                                            Height="60"
                                            Orientation="Horizontal" 
                                              VerticalAlignment="Bottom">
                                        <TextBlock Text="{Binding MovieName}" 
                                               FontSize="35" />
                                  </StackPanel>
                                </Grid>
                            </Border>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
      </Grid> But in listbox Images of different widths and heights were displaying.
    As shown in below screenshot..
    I need to get all images of equal height and width.How can I resize them.Do we have any methods of resizing or compressing the images to equal heights and widths....Plzz..help me..
    ManyThanks in advance...

    Hi
    There is a similar thread on re-sizing image. Please see if it helps.
    https://social.msdn.microsoft.com/forums/windowsapps/en-us/00779641-d6d2-42af-b368-8b32f2c702cc/writeablebitmap-resizing
    Regards
    Varun Ravindranath Please 'Mark as Answer' if my post answers your question and 'Vote as Helpful' if it helps you.

  • Binding in DataTemplate WPF

    Hi everyone,
    I'm now making a simple File Manager app. My application contains a ListBox whose ItemsSource={Binding FileList}
    Each item of my listBox is defined with custom item template which is used for displaying the status of file
    <ListBox.ItemsPanel>
    <ItemsPanelTemplate>
    <StackPanel/>
    </ItemsPanelTemplate>
    </ListBox.ItemsPanel>
    <ListBox.ItemTemplate>
    <DataTemplate>
    <Grid Height="23">
    <Grid.ColumnDefinitions>
    <ColumnDefinition Width="23"/>
    <ColumnDefinition Width="*"/>
    </Grid.ColumnDefinitions>
    <Image Stretch="Fill"/>
    <TextBlock Margin="10, 0, 0, 0"
    Text="{Binding LastModified}"
    VerticalAlignment="Center"
    HorizontalAlignment="Left"
    Grid.Column="1"/>
    </DataTemplate>
    </ListBox.ItemTemplate>
    As you see, each item has an Image . I want that Image to be displayed as Locked if 2 conditions are satisfied : DateTime.Now - LastModified < 60 and Path is exists
    (LastModified and Path are property of FileList) . I'm thinking about MultiBinding but tried so many time with failure 
    Can anyone help me please ? 
    Thank you

    You could use a converter and a DataTrigger that sets some property of the Image (Source or Opacity for example) based on whether the condition is true or false:
    namespace WpfApplication22
    class CustomConverter : IValueConverter
    public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) {
    FileList item = value as FileList;
    if (item != null && string.IsNullOrEmpty(item.Path) && System.IO.File.Exists(item.Path) && (DateTime.Now.Date.Subtract(item.LastModified.Date).TotalDays < 60))
    return true;
    return false;
    public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) {
    throw new NotImplementedException();
    <ListBox ItemsSource="{Binding FileList}" xmlns:local="clr-namespace:WpfApplication22">
    <ListBox.Resources>
    <local:CustomConverter x:Key="conv"/>
    </ListBox.Resources>
    <ListBox.ItemTemplate>
    <DataTemplate>
    <Grid Height="23">
    <Grid.ColumnDefinitions>
    <ColumnDefinition Width="23"/>
    <ColumnDefinition Width="*"/>
    </Grid.ColumnDefinitions>
    <Image Stretch="Fill" >
    <Image.Style>
    <Style TargetType="Image">
    <Setter Property="Source" Value="av1.png"/>
    <Style.Triggers>
    <DataTrigger Binding="{Binding Path=., Converter={StaticResource conv}}" Value="True">
    <Setter Property="Opacity" Value="0.5"/>
    <!-- or set the source -->
    <!--<Setter Property="Source" Value="locked.png"/>-->
    </DataTrigger>
    </Style.Triggers>
    </Style>
    </Image.Style>
    </Image>
    <TextBlock Margin="10, 0, 0, 0" Text="{Binding LastModified}" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Column="1"/>
    </Grid>
    </DataTemplate>
    </ListBox.ItemTemplate>
    </ListBox>
    There is no reason to use a multi-converter here since you can bind to the FileList (or whatever your class is called) itself as shown in the above sample code.
    Hope that helps.
    Please remember to close your threads by marking helpful posts as answer.

  • Drag and Drop (and re-order) to ListBox binded to XML

    Would you please help me with this scenario:
    On stage, 2 listboxes and a textbox.
    1.The first listbox lists all the items available, the list is grouped by 'Type' and its source is a binded XML file (read only).
    2.The second listbox list all the items the user has dropped into from ListBox#1 and it should read from an XML at start-up and save to it on quitting.
    3.The textbox list the details of the currently selected item in ListBox#2
    My knowledge (and search on internet ) allowed me to achieve binding, grouping with an expander and perhaps the first step to drag item (to be verified)..but I'm
    stucked at dropping AND re-ordering items on ListBox#2..then saving to the XML!!
    Would you please help (even in c#..I'll try to do the translation) ? I join a graphic and the project file (with XML files inside) to help you help me! Thanks!!
    Download project
    The XAML
    <Window x:Class="MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:scm="clr-namespace:System.ComponentModel;assembly=WindowsBase"
        xmlns:dat="clr-namespace:System.Windows.Data;assembly=PresentationFramework"
        Title="MainWindow" Height="400" Width="525">
        <Grid>
            <Grid.Resources>
                <DataTemplate x:Key="Resource3">
                    <Label Content="{Binding XPath=Name}"/>
                </DataTemplate>
                <Style x:Key="ListBoxItemStyle1" TargetType="{x:Type ListBoxItem}">
                    <EventSetter Event="ListBoxItem.PreviewMouseLeftButtonDown" Handler="s_PreviewMouseLeftButtonDown" />
                </Style>
                <Style x:Key="ListBoxItemStyle2" TargetType="{x:Type ListBoxItem}">
                    <Setter Property="AllowDrop" Value="true"/>
                    <EventSetter Event="ListBoxItem.PreviewMouseLeftButtonDown" Handler="s_PreviewMouseLeftButtonDown" />
                    <EventSetter Event="ListBoxItem.Drop" Handler="listbox_Drop"/>
                </Style>
            </Grid.Resources>
            <Grid Name="Grid01">
                <Grid.Resources>
                    <CollectionViewSource x:Key="cvsSystems" Source="{Binding XPath=System}">
                        <CollectionViewSource.SortDescriptions>
                            <scm:SortDescription PropertyName="@Type"/>
                            <scm:SortDescription PropertyName="Name"/>
                        </CollectionViewSource.SortDescriptions>
                        <CollectionViewSource.GroupDescriptions>
                            <dat:PropertyGroupDescription  PropertyName="@Type"/>
                        </CollectionViewSource.GroupDescriptions>
                    </CollectionViewSource>
                </Grid.Resources>
                <ListBox ItemsSource="{Binding Source={StaticResource
    cvsSystems}}" ItemTemplate="{StaticResource Resource3}"
    SelectedValuePath="Name" IsSynchronizedWithCurrentItem="True"
    HorizontalAlignment="Left" x:Name="ListBox1" Width="160"
    ItemContainerStyle="{DynamicResource ListBoxItemStyle1}"
    Margin="0,0,0,0">
                    <ListBox.GroupStyle>
                        <GroupStyle>
                            <GroupStyle.ContainerStyle>
                                <Style TargetType="{x:Type GroupItem}">
                                    <Setter Property="Template">
                                        <Setter.Value>
                                            <ControlTemplate>
                                                <Expander Header="{Binding Name}" IsExpanded="True">
                                                    <ItemsPresenter />
                                                </Expander>
                                            </ControlTemplate>
                                        </Setter.Value>
                                    </Setter>
                                </Style>
                            </GroupStyle.ContainerStyle>
                        </GroupStyle>
                    </ListBox.GroupStyle>
                </ListBox>
            </Grid>
            <Grid Name="Grid02">
                <Grid.Resources>
                    <CollectionViewSource x:Key="cvsPreferences" Source="{Binding XPath=System}">
                        <CollectionViewSource.SortDescriptions>
                            <scm:SortDescription PropertyName="@Type"/>
                            <scm:SortDescription PropertyName="Name"/>
                        </CollectionViewSource.SortDescriptions>
                        <CollectionViewSource.GroupDescriptions>
                            <dat:PropertyGroupDescription  PropertyName="@Type"/>
                        </CollectionViewSource.GroupDescriptions>
                    </CollectionViewSource>
                </Grid.Resources>
                <ListBox ItemsSource="{Binding Source={StaticResource
    cvsPreferences}}" ItemTemplate="{StaticResource Resource3}"
    SelectedValuePath="Name" IsSynchronizedWithCurrentItem="True"
    HorizontalAlignment="Left" x:Name="ListBox2" Width="160"
    ItemContainerStyle="{DynamicResource ListBoxItemStyle2}"
    Margin="170,0,0,0"/>
                <Button Content="Save" Height="23"
    HorizontalAlignment="Left" Margin="385,320,0,0" Name="Button1"
    VerticalAlignment="Top" Width="75" />
            </Grid>
            <TextBox DataContext="{Binding SelectedItem,
    ElementName=ListBox2}" Text="{Binding
    UpdateSourceTrigger=PropertyChanged, XPath=Detail}" Margin="340,0,0,0"
    x:Name="TextBox1" HorizontalAlignment="Left" VerticalAlignment="Top"
    Width="160"/>
        </Grid>
    </Window>
    The VB code
    Imports System.IO
    Imports System.Xml
    Class MainWindow
        Dim sysdata As XmlDocument = New XmlDocument()
        Dim prefdata As XmlDocument = New XmlDocument()
        Dim systemdata As XmlDataProvider = New XmlDataProvider()
        Dim preferencedata As XmlDataProvider = New XmlDataProvider()
        Private Sub MainWindow_Loaded(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles Me.Loaded
            'Initialisation XML
            sysdata.Load(System.AppDomain.CurrentDomain.BaseDirectory & "Systems.xml")
            prefdata.Load(System.AppDomain.CurrentDomain.BaseDirectory & "Preferences.xml")
            systemdata.Document = sysdata
            preferencedata.Document = prefdata
            systemdata.XPath = "Systems"
            preferencedata.XPath = "Systems"
            Grid01.DataContext = systemdata
            Grid02.DataContext = preferencedata
        End Sub
        Private Sub s_PreviewMouseLeftButtonDown(ByVal sender As Object, ByVal e As MouseButtonEventArgs)
            If TypeOf sender Is ListBoxItem Then
                Dim draggedItem As ListBoxItem = TryCast(sender, ListBoxItem)
                DragDrop.DoDragDrop(draggedItem, draggedItem.DataContext, DragDropEffects.Copy)
                draggedItem.IsSelected = True
            End If
        End Sub
        Private Sub listbox_Drop(ByVal sender As Object, ByVal e As DragEventArgs)
        End Sub
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles Button1.Click
            preferencedata.Document.Save(System.AppDomain.CurrentDomain.BaseDirectory & "Preferences.xml")
        End Sub
    End Class

    Barry,
    Thank you very much for your reply...I've followed your advices, read the links you posted...and maked use of ObservableCollection.
    So, the listbox source is a CollectionViewSource whose source is an ObservableCOllection object.
    Unfortunately I'm still stucked at the drop part. (then there will be the save back to the xml file)
    I think that the drag part might be right !?
    Could someone please help ??
    XAML
    <Window x:Class="MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:scm="clr-namespace:System.ComponentModel;assembly=WindowsBase"
    xmlns:dat="clr-namespace:System.Windows.Data;assembly=PresentationFramework"
    xmlns:c="clr-namespace:WpfApplication1"
    Title="MainWindow" Height="400" Width="525">
    <Window.Resources>
    <c:NameList x:Key="NameListData"/>
    <c:PreferenceList x:Key="PreferenceListData"/>
    </Window.Resources>
    <Grid>
    <Grid.Resources>
    <Style x:Key="ListBoxItemStyle1" TargetType="{x:Type ListBoxItem}">
    <EventSetter Event="ListBoxItem.PreviewMouseLeftButtonDown" Handler="s_PreviewMouseLeftButtonDown" />
    </Style>
    <Style x:Key="ListBoxItemStyle2" TargetType="{x:Type ListBoxItem}">
    <Setter Property="AllowDrop" Value="true"/>
    <EventSetter Event="ListBoxItem.PreviewMouseLeftButtonDown" Handler="s_PreviewMouseLeftButtonDown" />
    <EventSetter Event="ListBoxItem.Drop" Handler="listbox_Drop"/>
    </Style>
    </Grid.Resources>
    <Grid Name="Grid01">
    <Grid.Resources>
    <CollectionViewSource x:Key="cvsSystems" Source="{StaticResource NameListData}">
    <CollectionViewSource.SortDescriptions>
    <scm:SortDescription PropertyName="Type"/>
    <scm:SortDescription PropertyName="Name"/>
    </CollectionViewSource.SortDescriptions>
    <CollectionViewSource.GroupDescriptions>
    <dat:PropertyGroupDescription PropertyName="Type"/>
    </CollectionViewSource.GroupDescriptions>
    </CollectionViewSource>
    </Grid.Resources>
    <ListBox ItemsSource="{Binding Source={StaticResource cvsSystems}}" DisplayMemberPath="Name" IsSynchronizedWithCurrentItem="True" HorizontalAlignment="Left" x:Name="ListBox1" Width="160" ItemContainerStyle="{DynamicResource ListBoxItemStyle1}" Margin="0,0,0,0">
    <ListBox.GroupStyle>
    <GroupStyle>
    <GroupStyle.ContainerStyle>
    <Style TargetType="{x:Type GroupItem}">
    <Setter Property="Template">
    <Setter.Value>
    <ControlTemplate>
    <Expander Header="{Binding Name}" IsExpanded="True">
    <ItemsPresenter />
    </Expander>
    </ControlTemplate>
    </Setter.Value>
    </Setter>
    </Style>
    </GroupStyle.ContainerStyle>
    </GroupStyle>
    </ListBox.GroupStyle>
    </ListBox>
    </Grid>
    <Grid Name="Grid02">
    <Grid.Resources>
    <CollectionViewSource x:Key="cvsPreferences" Source="{StaticResource PreferenceListData}">
    <CollectionViewSource.SortDescriptions>
    <scm:SortDescription PropertyName="Type"/>
    <scm:SortDescription PropertyName="Name"/>
    </CollectionViewSource.SortDescriptions>
    <CollectionViewSource.GroupDescriptions>
    <dat:PropertyGroupDescription PropertyName="Type"/>
    </CollectionViewSource.GroupDescriptions>
    </CollectionViewSource>
    </Grid.Resources>
    <ListBox ItemsSource="{Binding Source={StaticResource cvsPreferences}}" DisplayMemberPath="Name" IsSynchronizedWithCurrentItem="True" HorizontalAlignment="Left" x:Name="ListBox2" Width="160" ItemContainerStyle="{DynamicResource ListBoxItemStyle2}" Margin="170,0,0,0"/>
    <Button Content="Save" Height="23" HorizontalAlignment="Left" Margin="385,320,0,0" Name="Button1" VerticalAlignment="Top" Width="75" />
    </Grid>
    <!--<TextBox DataContext="{Binding SelectedItem, ElementName=ListBox2}" Text="{Binding UpdateSourceTrigger=PropertyChanged, XPath=Detail}" Margin="340,0,0,0" x:Name="TextBox1" HorizontalAlignment="Left" VerticalAlignment="Top" Width="160"/>-->
    </Grid>
    </Window>
    VB
    Imports System.Collections.ObjectModel
    Imports System.Xml
    Imports System.IO
    Class MainWindow
    Private Sub MainWindow_Loaded(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles Me.Loaded
    End Sub
    Private Sub s_PreviewMouseLeftButtonDown(ByVal sender As Object, ByVal e As MouseButtonEventArgs)
    If TypeOf sender Is ListBoxItem Then
    Dim draggedItem As ListBoxItem = TryCast(sender, ListBoxItem)
    DragDrop.DoDragDrop(draggedItem, draggedItem.DataContext, DragDropEffects.Copy)
    draggedItem.IsSelected = True
    End If
    End Sub
    Private Sub ListBox2_Drop(ByVal sender As System.Object, ByVal e As System.Windows.DragEventArgs) Handles ListBox2.Drop
    Dim _class As SystemName = DirectCast(e.Data.GetData(GetType(SystemName)), SystemName)
    If _class IsNot Nothing Then
    Dim lcv As ListCollectionView = DirectCast(ListBox2.ItemsSource, ListCollectionView) '?
    End If
    End Sub
    Private Sub listbox_Drop(ByVal sender As Object, ByVal e As DragEventArgs)
    End Sub
    End Class
    Public Class NameList
    Inherits ObservableCollection(Of SystemName)
    ' Methods
    Public Sub New()
    Dim sysdata As XmlDocument = New XmlDocument()
    sysdata.Load(System.AppDomain.CurrentDomain.BaseDirectory & "Systems.xml")
    Dim root As XmlElement = sysdata.DocumentElement
    Dim nodes As XmlNodeList = root.SelectNodes("System")
    For Each node As XmlNode In nodes
    Dim tyype As String = node.Attributes("Type").Value
    MyBase.Add(New SystemName(tyype, node("Name").InnerText, node("Detail").InnerText))
    Next
    End Sub
    End Class
    Public Class PreferenceList
    Inherits ObservableCollection(Of SystemName)
    ' Methods
    Public Sub New()
    Dim sysdata As XmlDocument = New XmlDocument()
    sysdata.Load(System.AppDomain.CurrentDomain.BaseDirectory & "Preferences.xml")
    Dim root As XmlElement = sysdata.DocumentElement
    Dim nodes As XmlNodeList = root.SelectNodes("System")
    For Each node As XmlNode In nodes
    Dim tyype As String = node.Attributes("Type").Value
    MyBase.Add(New SystemName(tyype, node("Name").InnerText, node("Detail").InnerText))
    Next
    End Sub
    End Class
    Public Class SystemName
    ' Fields
    Private _type As String
    Private _name As String
    Private _detail As String
    ' Methods
    Public Sub New(ByVal type As String, ByVal name As String, ByVal detail As String)
    Me._type = type
    Me._name = name
    Me._detail = detail
    End Sub
    ' Properties
    Public Property Type() As String
    Get
    Return Me._type
    End Get
    Set(ByVal value As String)
    Me._type = value
    End Set
    End Property
    Public Property Name() As String
    Get
    Return Me._name
    End Get
    Set(ByVal value As String)
    Me._name = value
    End Set
    End Property
    Public Property Detail() As String
    Get
    Return Me._detail
    End Get
    Set(ByVal value As String)
    Me._detail = value
    End Set
    End Property
    End Class
    'Systems.xml' file
    <?xml version="1.0" encoding="utf-8"?>
    <Systems>
    <System Type="TypeA">
    <Name>NameA1</Name>
    <Detail>This is the detail for NameA1</Detail>
    </System>
    <System Type="TypeB">
    <Name>NameB1</Name>
    <Detail>This is the detail for NameB1</Detail>
    </System>
    <System Type="TypeC">
    <Name>NameC1</Name>
    <Detail>This is the detail for NameC1</Detail>
    </System>
    <System Type="TypeA">
    <Name>NameA2</Name>
    <Detail>This is the detail for NameA2</Detail>
    </System>
    <System Type="TypeB">
    <Name>NameB2</Name>
    <Detail>This is the detail for NameB2</Detail>
    </System>
    <System Type="TypeC">
    <Name>NameC2</Name>
    <Detail>This is the detail for NameC2</Detail>
    </System>
    <System Type="TypeA">
    <Name>NameA3</Name>
    <Detail>This is the detail for NameA3</Detail>
    </System>
    <System Type="TypeB">
    <Name>NameB3</Name>
    <Detail>This is the detail for NameB3</Detail>
    </System>
    <System Type="TypeC">
    <Name>NameC3</Name>
    <Detail>This is the detail for NameC3</Detail>
    </System>
    </Systems>
    'Preferences.xml' file
    <?xml version="1.0" encoding="utf-8"?>
    <Systems>
    <System Type="TypeA">
    <Name>NameA1</Name>
    <Detail>This is the detail for NameA1</Detail>
    </System>
    <System Type="TypeC">
    <Name>NameC3</Name>
    <Detail>This is the detail for NameC3</Detail>
    </System>
    </Systems>

  • How to load a image after getting it with a file chooser?

    I'm still starting with JavaFX, and I simply would like to know how to load the image (e.g. png or jpg) that I selected using a FileChooser in the user interface. I can access the file normally within the code, but I'm still lost about how to load it appropriately. Every time I select a new image using the FileChooser, I should discard the previous one and consider the new one. My code is shown below:
    import javafx.stage.Stage;
    import javafx.scene.Scene;
    import javafx.scene.shape.Rectangle;
    import javafx.scene.paint.Color;
    import javafx.scene.layout.HBox;
    import javafx.scene.control.Button;
    import javax.swing.JFileChooser;
    import javafx.scene.image.ImageView;
    import javafx.scene.image.Image;
    var chooser: JFileChooser = new JFileChooser();
    var image;
    Stage {
        title: "Image"
        scene: Scene {
            width: 950
            height: 500
            content: [
                HBox {
                    layoutX: 670
                    layoutY: 18
                    spacing: 10
                    content: [
                        Button {
                            text: "Open"
                            action: function() {
                                if (JFileChooser.APPROVE_OPTION == chooser.showOpenDialog(null)) {
                                    var imageFile = chooser.getSelectedFile();
                                    println("{imageFile.getCanonicalFile()}");
                                    image = Image{
                                        width: 640
                                        url:imageFile.getAbsolutePath()
                // Image area
                Rectangle {
                    x: 10
                    y: 10
                    width: 640
                    height: 480
                    fill: Color.WHITE
                ImageView {
                    x: 10
                    y: 10
                    image: bind image
    }Thank you in advance for any suggestion to make it work. :)

    As its name implies, the url param expect... an URL, not a file path!
    So, use {color:#8000FF}url: imageFile.toURI().toURL(){color} instead.

  • How can a hyperlink in a table load an image in a new page?

    Hello,
    I�m using Java Studion Creator 2 Update 1 an I have following problem:
    In my jsp-page (main.jsp) I have a table component with an image hyperlink (showOriginal) in the first column and a hyperlink to another page in the second. On this page is also a hyperlink, which refreshes the table.
    The hyperlink "showOriginal"should open an new browser window and display an image depending on the selected table row. I set the property "target" for the hyperlink to "new Window" and specified an event_method (showOriginal_action() ), which gets the image for the selected table row and returns a new jsp-page (originalView.jsp).
    OriginalView.jsp has only one image component. The url for this image is set by the event_method of the image-hyperlink of main.jsp. Everything works fine but if I press the refresh link on the main.jsp to refresh the table (after opening the new window with the image), the image is also loaded in the main.jsp and every other link causes the same problem. Even when I close the window with the image, the same happens. It seems to my like I`m still on the main.jsp and not on the originalView.jsp (after I included a </redirect> tag in navigation.xml, I can see in the browser address line that the OriginalView.jsp is loaded) and the main.jsp "thinks" that the current content of itself is the image?
    I changed the return value of showOriginal_action() to null (because of the target property I always get the originalView-page) and then I included an onClick-method for the imagehyperlink to open a new window with the image via javascript but this didn`t work because the onclick is performed first and at this time I don`t have the image url yet (because first I must know, which row was selected in the table).
    Am I doing something wrong or is this not the correct way to do this? I just want to click the link in the table and a new window/page should be opened, which displays the image, independent from anything else. and all the links in the main-page must still work properly.
    I appreciate any help & suggestions.
    thanks
    Message was edited by:
    dan_k

    hi,
    here the code of main.jsp (with your suggestions):
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:ui="http://www.sun.com/web/ui">
    <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
    <f:view>
    <ui:page binding="#{main.page1}" id="page1">
    <ui:html binding="#{main.html1}" id="html1">
    <ui:head binding="#{main.head1}" id="head1" title="SEWM">
    <ui:link binding="#{main.link1}" id="link1" url="/resources/stylesheet.css"/>
    <ui:script binding="#{main.script1}" id="script1" url="/resources/global.js"/>
    </ui:head>
    <ui:body binding="#{main.body1}" id="body1" style="background-color: rgb(255, 255, 255); -rave-layout: grid">
    <ui:form binding="#{main.formMain}" id="formMain" target="_self">
    <div id="main">
    <h:panelGrid binding="#{main.header}" id="header" styleClass="abc_header_bar">
    <ui:image binding="#{main.image1}" id="image1" styleClass="abc_header_logo" url="/resources/abc_logo.gif"/>
    <ui:image binding="#{main.imageLine1}" id="imageLine1" styleClass="abc_header_logoLine" url="/resources/amb_leiste.gif"/>
    <ui:staticText binding="#{main.staticText2}" id="staticText2" styleClass="abc_page_title" text="IWM Control"/>
    </h:panelGrid>
    <h:panelGrid binding="#{main.menu}" columns="1" id="menu" styleClass="abc_menu_wrapper">
    <ui:image align="middle" binding="#{main.imageLeon1}" height="81" id="imageLeon1" url="/resources/leon.gif"/>
    <h:panelGrid binding="#{main.gridPanel1}" id="gridPanel1" styleClass="abc_menu_box">
    <ui:hyperlink action="#{main.changePssw_action}" binding="#{main.hyperlinkChangePassword}" id="hyperlinkChangePassword"
    style="color:#990000" text="#{main.propertyResourceProvider1.value['changePassword']}"/>
    <ui:hyperlink action="#{main.refresh_action}" binding="#{main.hyperlinkRefresh}" id="hyperlinkRefresh"
    onClick="function test() {&#xa; this.formMain.target='_self';&#xa;}" style="color:#990000" text="#{main.propertyResourceProvider1.value['refresh']}"/>
    <ui:hyperlink binding="#{main.customerHelp1}" id="customerHelp1" immediate="true" style="color:#990000" styleClass=""
    target="_blank" text="Hilfe" url="/main.html"/>
    <ui:label binding="#{main.label2}" id="label2" styleClass="abc_lbplaceholder" text="_______________________"/>
    <ui:staticText binding="#{main.staticText108}" id="staticText108" styleClass="abc_tinfo" text="TEST Info" toolTip="#{SessionBean1.testSystemInfo}"/>
    </h:panelGrid>
    </h:panelGrid>
    <h:panelGrid binding="#{main.gridPanelUserInfo1}" columns="3" id="gridPanelUserInfo1" styleClass="abc_userinfo">
    <ui:staticText binding="#{main.staticText1}" id="staticText1" text="Sie sind angemeldet als "/>
    <ui:staticText binding="#{main.registeredUser1}" id="registeredUser1" text="#{SessionBean1.webFacade.user.uname}"/>
    <ui:hyperlink action="#{main.logout_action}" binding="#{main.logout1}" id="logout1" style="color: #ffffff" text="#{main.propertyResourceProvider1.value['logout']}"/>
    </h:panelGrid>
    <h:panelGrid binding="#{main.gridPanel86}" id="gridPanel86" styleClass="abc_page_content">
    <ui:label binding="#{main.label3}" id="label3" text="#{main.propertyResourceProvider1.value['sysmessages']}"/>
    <ui:messageGroup binding="#{main.outlineTableMessageGroup}" id="outlineTableMessageGroup" styleClass="abc_messagebox"/>
    <ui:tabSet binding="#{main.tabSet1}" id="tabSet1" lite="true" mini="true" selected="tab2">
    <ui:tab action="#{main.tab2_action}" binding="#{main.tab2}" id="tab2" text="#{main.propertyResourceProvider1.value['openProcesses']}">
    <ui:panelLayout binding="#{main.layoutPanel2}" id="layoutPanel2">
    <ui:table binding="#{main.table3}" id="table3" paginateButton="true" paginationControls="true"
    styleClass="abc_main_fulltable" title="Offene Vorg�nge" width="600">
    <script><![CDATA[
    /* ----- Functions for Table Preferences Panel ----- */
    * Toggle the table preferences panel open or closed
    function togglePreferencesPanel1() {
    var table = document.getElementById("form1:tabSet1:tab2:table3");
    table.toggleTblePreferencesPanel();
    /* ----- Functions for Filter Panel ----- */
    * Return true if the filter menu has actually changed,
    * so the corresponding event should be allowed to continue.
    function filterMenuChanged1() {
    var table = document.getElementById("form1:tabSet1:tab2:table3");
    return table.filterMenuChanged();
    * Toggle the custom filter panel (if any) open or closed.
    function toggleFilterPanel1() {
    var table = document.getElementById("form1:tabSet1:tab2:table3");
    return table.toggleTableFilterPanel();
    /* ----- Functions for Table Actions ----- */
    * Initialize all rows of the table when the state
    * of selected rows changes.
    function initAllRows1() {
    var table = document.getElementById("form1:tabSet1:tab2:table3");
    table.initAllRows();
    * Set the selected state for the given row groups
    * displayed in the table. This functionality requires
    * the 'selectId' of the tableColumn to be set.
    * @param rowGroupId HTML element id of the tableRowGroup component
    * @param selected Flag indicating whether components should be selected
    function selectGroupRows1(rowGroupId, selected) {
    var table = document.getElementById("form1:tabSet1:tab2:table3");
    table.selectGroupRows(rowGroupId, selected);
    * Disable all table actions if no rows have been selected.
    function disableActions1() {
    // Determine whether any rows are currently selected
    var table = document.getElementById("form1:tabSet1:tab2:table3");
    var disabled = (table.getAllSelectedRowsCount() > 0) ? false : true;
    // Set disabled state for top actions
    document.getElementById("form1:tabSet1:tab2:table3:tableActionsTop:deleteTop").setDisabled(disabled);
    // Set disabled state for bottom actions
    document.getElementById("form1:tabSet1:tab2:table3:tableActionsBottom:deleteBottom").setDisabled(disabled);
    }]]></script>
    <ui:tableRowGroup binding="#{main.tableRowGroup4}" emptyDataMsg="Keine Vorg�nge gefunden." id="tableRowGroup4"
    rows="20" sourceData="#{SessionBean1.openProcesses}" sourceVar="currentRowTable">
    <ui:tableColumn binding="#{main.tableColumn23}" embeddedActions="true" id="tableColumn23" noWrap="true">
    <ui:panelGroup binding="#{main.groupPanel13}" id="groupPanel13">
    <ui:imageHyperlink action="#{main.showOriginal_action}"
    alt="#{main.propertyResourceProvider1.value['ttShowOriginals']}"
    binding="#{main.imageHyperlink64}" id="imageHyperlink64"
    imageURL="/resources/original_small.gif" immediate="true" target="_blank" toolTip="#{main.propertyResourceProvider1.value['ttShowOriginals']}"/>
    </ui:panelGroup>
    </ui:tableColumn>
    <ui:tableColumn binding="#{main.tableColumn15}" headerText="Kreditor" id="tableColumn15" sort="vendorName">
    <ui:hyperlink action="#{main.edit_action}" binding="#{main.hyperlink1}" id="hyperlink1" text="#{currentRowTable.value['vendorName']}"/>
    </ui:tableColumn>
    <ui:tableColumn binding="#{main.tableColumn17}" headerText="Rechnungsnummer" id="tableColumn17" sort="refDocNo">
    <ui:staticText binding="#{main.staticText101}" id="staticText101" styleClass="abc_table_celltext" text="#{currentRowTable.value['refDocNo']}"/>
    </ui:tableColumn>
    <ui:tableColumn binding="#{main.tableColumn18}" headerText="Rechnungsdatum" id="tableColumn18" sort="docDate">
    <ui:staticText binding="#{main.staticText102}" converter="#{main.dateTimeConverter1}" id="staticText102"
    styleClass="abc_table_celltext" text="#{currentRowTable.value['docDate']}"/>
    </ui:tableColumn>
    <ui:tableColumn binding="#{main.tableColumn19}" headerText="F�lligkeit" id="tableColumn19" noWrap="true" sort="dueDate">
    <ui:staticText binding="#{main.staticText103}" converter="#{main.dateTimeConverter1}" id="staticText103"
    styleClass="abc_table_celltext" text="#{currentRowTable.value['dueDate']}"/>
    </ui:tableColumn>
    <ui:tableColumn binding="#{main.tableColumn21}" headerText="Zuordnung" id="tableColumn21" sort="stapleName">
    <ui:staticText binding="#{main.staticText105}" id="staticText105" styleClass="abc_table_celltext" text="#{currentRowTable.value['stapleName']}"/>
    </ui:tableColumn>
    </ui:tableRowGroup>
    <f:facet name="actionsBottom"/>
    </ui:table>
    </ui:panelLayout>
    </ui:tab>
    </ui:tabSet>
    </h:panelGrid>
    </div>
    <div id="wait" style="visibility: hidden;">
    <h:panelGrid binding="#{main.gridPanel8}" id="gridPanel8" styleClass="abc_wait_div">
    <ui:label binding="#{main.label1}" id="label1" styleClass="abc_labelwait_align" text="#{main.propertyResourceProvider1.value['loaddata']}"/>
    <ui:image binding="#{main.image15}" id="image15" url="/resources/loading.gif"/>
    </h:panelGrid>
    </div>
    </ui:form>
    </ui:body>
    </ui:html>
    </ui:page>
    </f:view>
    </jsp:root>
    originalView.jsp:
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:ui="http://www.sun.com/web/ui">
    <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
    <f:view>
    <ui:page binding="#{originalView.page1}" id="page1">
    <ui:html binding="#{originalView.html1}" id="html1">
    <ui:head binding="#{originalView.head1}" id="head1">
    <ui:link binding="#{originalView.link1}" id="link1" url="/resources/stylesheet.css"/>
    </ui:head>
    <ui:body binding="#{originalView.body1}" id="body1" style="-rave-layout: grid">
    <ui:form binding="#{originalView.form1}" id="form1">
    <ui:image binding="#{originalView.image1}" height="#{SessionBean1.archiveObjectsFileDataProvider.value['height']}" id="image1"
    style="left: 120px; top: 48px; position: absolute" url="#{SessionBean1.archiveObjectsFileDataProvider.value['url']}" width="#{SessionBean1.archiveObjectsFileDataProvider.value['width']}"/>
    </ui:form>
    </ui:body>
    </ui:html>
    </ui:page>
    </f:view>
    </jsp:root>
    and java-methods:
    public String showOriginal_action() {
    getSelectedRowFromMainTable();
         setSelectedImage(); // the image url ist then available via session bean
    return "originalView"; // displays the image using the url in the session bean
    public String refresh_action() {
    try {
    getSessionBean1().getOpenProcessTable();
    //hier I tried
    //getHyperlinkRefresh().setTarget("_self");
    //or getFormMain().setTarget("_self");
    catch(Exception ex) {
    error(ex.getMessage());
    return null;
    }

  • Can't load images under Linux with JavaFX img url

    I have a simple Imageview
    ImageView {
    x: bind mouseX
    y: 200
    //fitWidth works better than transforms
    fitWidth: 200;
    fitHeight: 200;
    image: bind img
    //transforms: [
    // Scale {x: bind myScaleX, y: bind myScaleY}]
    //Reflection effect
    effect: Reflection {
    bottomOpacity: 0.0
    topOpacity: 0.8
    fraction: 1.0
    topOffset: bind mouseY/5
    and I am loading the image like this in anoter function:
    img = Image {
    url: "file://home/suvi/NetBeansProjects/viewfx/src/viewfx/pictures/pic2.jpg"
    //url: "file:/D:/My Documents/NetBeansProjects/ViewFX/src/viewfx/pictures/pic2.jpg"
    //url: "{__DIR__}pictures/pic2.jpg"
    it works under Windows like line 2. Line 3 works under Windows and Linux,
    but Line 1 does not load a image under Linux ?!?
    What is the reason for that? any help?

    Hi raychen and Company
    ok, this is big trouble. I tested it under Windows XP SP3 and Fedora 12.
    The Image URL does not work equal under both system
    Windows: url: "file:/
    Linux: url "file://
    so much for the Java VM makes it system independable, NOT.
    Any workaround?
    Where can I fill a JavaFX Bugreport?

  • Image in datatgrid(table)

    Hi,
    I am using Datagrid where one of my column should contain some images .I could display images during my design time but at runtime the images are not displayed .could any one help on this.
    thanks in advance
    regards
    Amutha

    Add TableColumn, tableCellEditor=Image, bind property Image.source to a context attribute "ImageURL" <b>inside </b>the table data source node "Rows".
    Store the image URL for row #i in node element #i:
    for (int i = 0; i < wdContext.nodeRows().size(); ++i)
      IRowsElement row = wdContext.nodeRows().getRowsElementAt(i);
      row.setImageURL(<some URL>);
    If you store these images in the folder src/mimes/components/<name-of-component>, then you can simply give the filename as URL, e.g. "someimage.gif".
    Armin

  • Problem using url on local image

    Hi,
    i'm currently playing around with javaFx for a udpClient and i wanted to use Image included into my jar but doesn't work.
    ImageView {     
                        image: bind Image { url: ".//image//gradient.jpg" }
    ...it gives me:
    java.net.MalformedURLException: no protocol: image//favicon.ico
            at java.net.URL.<init>(URL.java:567)
            at java.net.URL.<init>(URL.java:464)
            at java.net.URL.<init>(URL.java:413)any idea why? is it mean to be only deployed and not forcast to run as an application with internal reference to image?
    thx you in advance

    ok forget it.
    too late over here :)
    ImageView {                    
                        image: bind Image { url: "file:./image/gradient.jpg" }will do the trick

  • No response when binding dataset to the subreport

    Hi,
    Environment:
    OS : Windows 7
    Crystal report for VS2010 (13.0.2)
    Visual Studio 2010 ( using WPF)
    How to bind the loaded dataset to the sub report. I tired in my code the following:
    try{
    rpt.OpenSubreport("SubreportName").SetDataSource(ds);
    Catch(Exception ex)
      MessageBox.WPFMessageBox.Show("error message " + ex.Message);
    While debugging dataset ds is having recordset loaded. When I bind using the above code snippet, no response or some getting error as "load report failed."
    Please help me ASAP.
    Thanks & Regards,
    Mani G.S.

    Hello,
    You can't simply open the subreport....
    Here's code on how to:
    public Form1()
         // Required for Windows Form Designer support
         InitializeComponent();
         // TODO: Add any constructor code after InitializeComponent call
         //Create an instance of the strongly-typed MAIN report object
         crReportDocument = new MainReport();
         //Get all the sections in the report
         crSections = crReportDocument.ReportDefinition.Sections;
         //Loop through each section of the report
         SubNames = "";
         foreach(Section crSection in crSections)
              //Get all the report objects from each section
              crReportObjects = crSection.ReportObjects;
              //Loop through each report object
              foreach(ReportObject crReportObject in crReportObjects)
                   //Check to see if the report object is a subreport
                   if (crReportObject.Kind == ReportObjectKind.SubreportObject)
                        //Found the subreport 
                        //Get the actual subreport object
                        crSubreportObject = (SubreportObject)crReportObject;
                        //Get the subreport as a regular report object 
                        //OpenSubreport returns the subreport object as a report
                        crSubreportDocument = crSubreportObject.OpenSubreport(crSubreportObject.SubreportName);
                        //Display the name of the subreport
                        if (SubNames.Length > 0) SubNames += ", ";
                        SubNames = crSubreportDocument.Name;
                   }//Go to the next report object
         }//Go to the next section
         MessageBox.Show("Subreport Names: " + SubNames);
         //Set the viewer to the report object to be previewed
         crystalReportViewer1.ReportSource = crReportDocument;
    Don

  • To get the object of listbox in Datatable

    hi all,
    in my project i have a table component which contain a checkbox,some static text and one listbox.When th page submits i need the selected options of the listbox.I also uses the checkbox to select.I am getting the rows which are checked.I need to get the selected optios also.Can anyone help me please
    Thanks & Regards
    Sree

    hi
    I think u didn't clear with my problem.Let me clear u.I have a table componenet in which first field is a checkbox field second a static text ,then another static text and then a listbox.i can select the check box and also multiple select from listbox.Now when i submit this page i have code like
    Iterator rows = getSessionBean1().getSelectedRow().iterator();
    List list=new ArrayList();
    while (rows.hasNext())
    getSessionBean1().getEmployeeListDataProvider().commitChanges();
    String rowId = (String) rows.next();
    RowKey rowKey = getSessionBean1().getEmployeeListDataProvider().getRowKey(rowId);
    EmployeeBean emp=(EmployeeBean)getSessionBean1().getEmployeeListDataProvider().getObject(rowKey);
    String empID=emp.getEmpID();
    String empName=emp.getEmpName();
    String desig=emp.getDesignation();
    //String[] options=(String[])lstRoles.getSelected();
    list.add(new EmpResource(empID, empName, desig,"", "", "", "0", "", 0));
    EmpResourceListDP erp=new EmpResourceListDP(list);
    getSessionBean1().setEmpResourceListDP(erp);
    ok.That is iterating through the selected rows.so when i am trying to access the listbox(lstRoles) it gives a null pointer exception.
    The listbox is binded to sessionbean property which shows all roles
    hope u got my problem.Please help me
    Thanks and regards
    Sree

  • Zoom image using a ClipView node

    Hi, i'm having a little problem with this ClipViewnode. I'm trying to zoom and pan an image kinda like Google maps.
    The panning works great, but when i zoom in, the mostleft and the top of the image can't be displayed. it looks like the top and left side of the image are cut of somehow.
    here's my image:
    public var map : Image = Image
        preserveRatio: true
        url: "{__DIR__}schiphol2.jpg"
    }And this is what my ClipView node looks like:
    var background : ClipView = ClipView
            pannable: true
            width: 680
            height: 500
            node: Group
                content:
                    ImageView
    //                    preserveRatio: true
                        image: map
                        scaleX: bind size
                        scaleY: bind size
                        onMouseClicked: function( e:MouseEvent ) : Void
                            if( e.controlDown )
                                if( size > 1 )
                                    size -= 0.1;
                            else
                                size += 0.1;
                            println("size of map: {map.width} by {map.height} ");
                        onMouseDragged: function( e:MouseEvent ) : Void
        }I think the image width and height have to be upscaled when i zoom in, but i can't, because these attributes have private acces.
    Can someone please point me in the right direction?

    I've been playing a little bit today and i've found something that does the trick for me, but i dont think this is a realy nice soution.
    This is what i have done:
    var background : ClipView = ClipView
            pannable: true
            width: 680
            height: 500
            node: Group
                content:
                    ImageView
                        image: bind map
                        onMouseClicked: function( e:MouseEvent ) : Void
                            if( e.controlDown )
                                if( map_width > 1000 )
                                    map_width -= 50;
                            else if( map_width < 2600 )
                                map_width += 50;
                            map = Image
                                preserveRatio: true
                                width: map_width
                                url: "{__DIR__}schiphol2.jpg"
        }Question remains: "Is there a better/nicer way to do this?"

  • Will i have any noticeable benefits converting my project from winform to WPF

    Hello !
    I have a large WinForm project in vb.net 2013. ( it's a financial project ).
    I never used WPF , but I read something about it.
    As your opinion , will I have any noticeable benefit if I convert my project to WPF ?
    Thank you !

    Hello dcode25,
    There are several advantages to WPF in my opinion.
    As a designer and developer myself, I must say that WPF is well crafted to function in a designer/developer team split. Blend is a phenomenal tool that inspires creativity and exploration for designers, allowing developers to continue coding without being
    involved in UI changes.
    As a developer one of the greatest aspects to WPF is the binding infrastructure. It's incredibly powerful, so powerful in fact that it is the driving force behind the MVVM pattern. This is certainly a benefit for your financial application since I imagine
    you're manipulating quite a bit of data and displaying it. Simply said, binding reduces the majority of your code-behind "glue" code and lets you work more naturally with objects and properties.
    Another aspect of learning WPF is that XAML, binding and the MVVM pattern are not going anywhere anytime soon. What you learn can carry over to Modern Apps and Windows Phone Apps. This still holds true for Windows 10 "Windows Apps".
    Some people will tell you WPF is only for "fancy" UI apps.  That's cute, and totally incorrect. WPF can help you build a better user experience even with the most subtle animations in your business apps. Meaningful animations like letting
    the user know when an item has been filtered out by making it fade away or scale down. This might seem small, but to the user it is polish and better understanding. WPF was built to enable this.
    If you're ready to move on to Modern Apps then by all means go down that path because it is clearly the blessed strategy by Microsoft at this time.  If you're not, learning and moving your app to WPF is a great way to prepare for that step in the future..
    I hope this helps :)

Maybe you are looking for

  • Time Machine Didn't Back Up

    I have two hard drives that are both 2 Terrabytes. One is the main and the other is the Time Machine backup. I just accidentally overwrote a Flash FLA file, so I selected it and ran Time Machine. There is no backup of this file even though it's on th

  • How to detect the size in pixels or percentage of a scrolling area?

    Hello there! I'm working capturing scrolling images and found a problem when I try it in another laptop, the thing was the resolution because in mine the scrolled area is added to the principal image and as I go down I merge the scrolling. But in oth

  • Error Code: 204 Creative Cloud download issue

    I was downloading the new creative cloud onto my Windows 8 and I kept getting Error Code: 204? Can someone please help? Because this is so frustrating! Thank you, A

  • Remove the report location from reports.

    How can I remove the report location from reports? Thanks. Andrea.

  • How does the sync process work?

    Hello all, I want to know what will happen if both the local and network homes have been modified for a period of two weeks and then the user chooses to synch? Will the sync process ask which 'home' is the most recent or will it replace older files w