| <radGrid:GridViewDataColumn Header="State" Width="090" Background="{Binding Path=State, Converter={StaticResource StateToColorConverter}}" DataMemberBinding="{Binding Path=State}"/> |
| <radGrid:RadGridView ItemsSource="{Binding Orders}" > |
| <radGrid:RadGridView.Columns> |
| <radGrid:GridViewDataColumn Header="State" Width="090" Background="{Binding Path=State, Converter={StaticResource StateToColorConverter}}" DataMemberBinding="{Binding Path=State}"/> |
| </radGrid:RadGridView.Columns> |
| </radGrid:RadGridView> |
| private ObservableCollection<SingleOrder> _orders = new ObservableCollection<SingleOrder>() |
| public ObservableCollection<SingleOrder> Orders { get { return _orders; } } |
| public class SingleOrder |
| : ViewModelBase |
| { |
| private Instrument _instrument; |
| public Instrument Instrument |
| { |
| get { return _instrument; } |
| set |
| { |
| if (!Instrument.Equals(_instrument, value)) |
| { |
| _instrument = value; |
| this.OnPropertyChanged("Instrument"); |
| } |
| } |
| } |
| private System.String _state; |
| public System.String State |
| { |
| get { return _state; } |
| set |
| { |
| if (!String.Equals(_state, value)) |
| { |
| _state = value; |
| this.OnPropertyChanged("State"); |
| } |
| } |
| } |
| } |
// Create a new image object and add it to bing map.
Uri uri = new Uri(@"" + imageName, UriKind.Relative);
BitmapImage bitmap = new BitmapImage();
bitmap.BeginInit();
bitmap.UriSource = uri;
bitmap.EndInit();
Image image = new Image();
image.Source = bitmap;
image.Opacity = 0.85;
image.Width = imageWidth;
image.Height = imageHeight;
image.Stretch = Stretch.UniformToFill;
image.SnapsToDevicePixels = true;
image.Name = Name;
// When added to map, centre image over Lat/Long rather than use upper left corner for placement
image.VerticalAlignment = VerticalAlignment.Center;
image.HorizontalAlignment = HorizontalAlignment.Center;
// Add the image to the map
MapLayer.SetLocation(image, new Location(dLatitude, dLongitude));
iLayer.Items.Add(image);
Hello!
I’m working with your Chart, and I found it working incorrectly.
<QuickStart:ExampleControl x:Class="Telerik.Windows.Examples.Chart.WPF.TwoDimensional.Bar.Example"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:QuickStart="clr-namespace:Telerik.Windows.QuickStart;assembly=Telerik.Windows.QuickStart"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
<Grid>
<telerik:RadChart x:Name="RadChart1"/>
</Grid>
</QuickStart:ExampleControl>
As a result I expect to see a Chart of 0x0 size, but instead it’s 800x600.
I do not understand where this size comes from, because it’s not written anywhere.
How can I solve that problem?
The matter is crucial for me, since in my application I need to implement the floating layout.
Thank you very much.
RadarSoft
| <ControlTemplate x:Key="NewGaugeBackground" TargetType="{x:Type ContentControl}"> |
| <Grid Width="{TemplateBinding Width}" Height="{TemplateBinding Height}"> |
| <Grid.ColumnDefinitions> |
| <ColumnDefinition Width="20"/> |
| <ColumnDefinition Width="*"/> |
| <ColumnDefinition Width="20"/> |
| </Grid.ColumnDefinitions> |
| <Grid.RowDefinitions> |
| <RowDefinition Height="20"/> |
| <RowDefinition Height="*"/> |
| <RowDefinition Height="20"/> |
| </Grid.RowDefinitions> |
| <Ellipse Stretch="Fill" Grid.ColumnSpan="3" Grid.RowSpan="3"> |
| <Ellipse.Fill> |
| <ImageBrush ImageSource="pack://application:,,,/images/bronze.jpg" /> |
| </Ellipse.Fill> |
| <Ellipse.BitmapEffect> |
| <BevelBitmapEffect BevelWidth="20" |
| EdgeProfile="BulgedUp" |
| Relief="0.5" |
| Smoothness="0.3" /> |
| </Ellipse.BitmapEffect> |
| </Ellipse> |
| <Ellipse Grid.Row="1" Grid.Column="1" Stretch="Fill" Fill="White" /> |
| <Ellipse Grid.Row="1" Grid.Column="1" Height="48" Width="48"> |
| <Ellipse.Fill> |
| <ImageBrush ImageSource="pack://application:,,,/images/bronze.jpg" /> |
| </Ellipse.Fill> |
| <Ellipse.BitmapEffect> |
| <BevelBitmapEffect BevelWidth="5" |
| EdgeProfile="BulgedUp" |
| Relief="0.5" |
| Smoothness="0.3" /> |
| </Ellipse.BitmapEffect> |
| </Ellipse> |
| </Grid> |
| </ControlTemplate> |