예제 #1
0
        private void ItemPrice_Loaded(object sender, RoutedEventArgs e)
        {
            Brush lightYellow = new SolidColorBrush(Color.FromRgb(0xAA, 0x9E, 0x82));
            Brush lightGold   = new SolidColorBrush(Color.FromRgb(0xA3, 0x8D, 0x6D));

            string    priceType    = Price.Type == "~price" ? "Exact Price:" : "Asking Price:";
            TextBlock txtPriceType = new TextBlock {
                Text = priceType, Foreground = lightGold, TextAlignment = TextAlignment.Center, Margin = new Thickness(0, 6, 0, 0)
            };

            WrapPanel wrap = new WrapPanel {
                HorizontalAlignment = HorizontalAlignment.Center, Margin = new Thickness(0, 0, 0, 3)
            };

            wrap.Children.Add(new TextBlock {
                Text = Price.Amount + "x ", Foreground = lightYellow, Margin = new Thickness(0, 0, 0, 0), VerticalAlignment = VerticalAlignment.Center, FontWeight = FontWeights.Bold
            });

            StaticInfo info      = StaticInfo.Get(Price.Currency);
            string     imagePath = "https://web.poecdn.com" + info.Image;

            wrap.Children.Add(new ImageBox {
                CacheSource = imagePath, Width = 26
            });

            //wrap.Children.Add(new TextBlock { Text = " " + info.Text, Foreground = lightYellow });

            panel.Children.Add(txtPriceType);
            panel.Children.Add(wrap);
        }