예제 #1
0
        void AssociatedObject_RequestNodeImage(object sender, GridTreeRequestNodeImageEventArgs args)
        {
            DataRowView row = args.Item as DataRowView;

            if (row["Gender"].Equals("M"))
            {
                args.NodeImage = new BitmapImage(new Uri("pack://application:,,/images/male.png"));
            }
            else
            {
                args.NodeImage = new BitmapImage(new Uri("pack://application:,,/images/female.png"));
            }
        }
예제 #2
0
        /// <summary>
        /// Handles the RequestNodeImage event of the AssociatedObject control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="args">The <see cref="Syncfusion.Windows.Controls.Grid.GridTreeRequestNodeImageEventArgs"/> instance containing the event data.</param>
        void AssociatedObject_RequestNodeImage(object sender, GridTreeRequestNodeImageEventArgs args)
        {
            var item = args.Item as FileInfoModel;

            if (item.FileType == "Drive")
            {
                BitmapImage bitImage = new BitmapImage(new Uri("pack://application:,,/Images/DriveNode.png"));
                args.NodeImage = bitImage;
            }
            else if (item.FileType == "Directory")
            {
                args.NodeImage = new BitmapImage(new Uri("pack://application:,,/Images/folder.png"));
            }
        }
예제 #3
0
        /// <summary>
        /// Handles the RequestNodeImage event of the GanttGrid control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="args">The <see cref="Syncfusion.Windows.Controls.Grid.GridTreeRequestNodeImageEventArgs"/> instance containing the event data.</param>
        void GanttGrid_RequestNodeImage(object sender, GridTreeRequestNodeImageEventArgs args)
        {
            string countryName = (args.Item as TopCountries).Name;

            args.NodeImage = this.GetBitMapImage(countryName);
        }
예제 #4
0
 private void treeGrid_RequestNodeImage(object sender, GridTreeRequestNodeImageEventArgs args)
 {
     args.NodeImage = (this.AssociatedObject.DataContext as ViewModel).GetItemBitmap(args.Item as EmployeeInfo);
 }
예제 #5
0
 /// <summary>
 /// Handles the RequestNodeImage event of the AssociatedObject control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="args">The <see cref="Syncfusion.Windows.Controls.Grid.GridTreeRequestNodeImageEventArgs"/> instance containing the event data.</param>
 void AssociatedObject_RequestNodeImage(object sender, GridTreeRequestNodeImageEventArgs args)
 {
     args.NodeImage = viewModel.GetItemBitmap(args.Item as EmployeeInfo);
 }