/// <summary>
        /// Sets the item and properties to display.
        /// </summary>
        /// <param name="properties">An array of properties to display.</param>
        /// <param name="item">The item to display.</param>
        public void SetItem(
            Items.ItemProperty[] properties,
            Items.Item item)
        {
            // clear out any prior contents
            RowHost.Children.Clear();
            RowHost.RowDefinitions.Clear();

            // set up our row definitions
            for (int index = 0; index < properties.Length; ++index)
            {
                RowHost.RowDefinitions.Add(new RowDefinition());
            }

            // add our rows
            for (int index = 0; index < properties.Length; ++index)
            {
                InformationPanelRow row = new InformationPanelRow();
                Grid.SetRow(row, index);
                RowHost.Children.Add(row);              
                row.HeadingLabel.Text = properties[index].Name;                
                row.Cell.SetValue(item.Values[index], properties[index].PropertyType);
            }

            ItemBrandPanel.Text = item.Brand;
            ItemNamePanel.Text = item.Name;
        }
Example #2
0
        public void SetItem(
            Items.ItemProperty[] properties,
            Items.Item item,
            TagVisualization tv)
        {
            // clear out any prior contents
            RowHost.Children.Clear();
            RowHost.RowDefinitions.Clear();

            // set up our row definitions
            for (int index = 0; index < properties.Length; ++index)
            {
                RowHost.RowDefinitions.Add(new RowDefinition());
            }

            // add our rows
            for (int index = 0; index < properties.Length; ++index)
            {
                InformationPanelRow row = new InformationPanelRow();
                Grid.SetRow(row, index);
                RowHost.Children.Add(row);
                row.HeadingLabel.Text = properties[index].Name;
                row.Cell.SetValue(item.Values[index], properties[index].PropertyType);
            }
            TagData tagValue = tv.VisualizedTag;

            BRed.Tag           = tagValue;
            BWhite.Tag         = tagValue;
            BYellow.Tag        = tagValue;
            BBlue.Tag          = tagValue;
            BGreen.Tag         = tagValue;
            ItemNamePanel.Text = item.Name;
        }