or
<Window xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" x:Class="ISSUE.MainWindow" Title="MainWindow" Height="526" Width="762"> <Grid Background="{Binding Background,ElementName=Docking}"> <Grid.RowDefinitions> <RowDefinition Height="90" /> <RowDefinition Height="288*" /> </Grid.RowDefinitions> <telerik:RadDocking HasDocumentHost="True" Name="Docking" Grid.Row="2" > <!--DocumentHost--> <telerik:RadDocking.DocumentHost> <telerik:RadSplitContainer> <telerik:RadPaneGroup x:Name="GroupDocument"> </telerik:RadPaneGroup> </telerik:RadSplitContainer> </telerik:RadDocking.DocumentHost> <telerik:RadSplitContainer telerik:DockingPanel.InitialSize="260,260" MaxWidth="400" Name="LeftContainer" InitialPosition="DockedLeft"> <telerik:RadPaneGroup x:Name="GroupLeft"> <telerik:RadPane Header="Test" telerik:RadDocking.SerializationTag="MENU" CanUserClose="False" /> </telerik:RadPaneGroup> </telerik:RadSplitContainer> <telerik:RadSplitContainer telerik:DockingPanel.InitialSize="200,200" MaxWidth="400" x:Name="RightContainer" InitialPosition="DockedRight"> <telerik:RadPaneGroup x:Name="GroupRight"> </telerik:RadPaneGroup> </telerik:RadSplitContainer> <telerik:RadSplitContainer telerik:DockingPanel.InitialSize="200,200" x:Name="BottomContainer" InitialPosition="DockedBottom"> <telerik:RadPaneGroup x:Name="GroupBottom"> <telerik:RadPane Header="Output" telerik:RadDocking.SerializationTag="OUTPUT" CanUserClose="False" /> </telerik:RadPaneGroup> </telerik:RadSplitContainer> </telerik:RadDocking> <Button Content="Load Layout" Height="64" HorizontalAlignment="Left" Margin="196,12,0,0" Name="button1" VerticalAlignment="Top" Width="178" Click="button1_Click" /> <telerik:RadButton Content="Add New Panel" Grid.Row="1" Height="49" HorizontalAlignment="Left" Margin="12,33,0,0" Name="radButton1" VerticalAlignment="Top" Width="107" Click="radButton1_Click" /> <Button Content="Save Layout" Height="64" HorizontalAlignment="Left" Margin="12,12,0,0" Name="button2" VerticalAlignment="Top" Width="178" Click="button2_Click" /> </Grid> </Window> using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; using Telerik.Windows.Controls; using System.IO; namespace ISSUE { /// <summary> /// MainWindow.xaml 的交互逻辑 /// </summary> public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); } private void radButton1_Click(object sender, RoutedEventArgs e) { RadPane rp = new RadPane(); rp.Header = DateTime.Now.ToString("yyyyMMddHHmmssfff"); rp.Title = rp.Header; RadDocking.SetSerializationTag(rp, rp.Header.ToString()); this.GroupDocument.Items.Add(rp); } string layout = string.Empty; private string SaveLayoutAsString() { MemoryStream stream = new MemoryStream(); this.Docking.SaveLayout(stream); stream.Seek(0, SeekOrigin.Begin); StreamReader reader = new StreamReader(stream); return reader.ReadToEnd(); } private void LoadLayoutFromString(string xml) { using (Stream stream = new MemoryStream(Encoding.UTF8.GetBytes(xml))) { stream.Seek(0, SeekOrigin.Begin); this.Docking.LoadLayout(stream); } } private void button1_Click(object sender, RoutedEventArgs e) { LoadLayoutFromString(layout); } private void button2_Click(object sender, RoutedEventArgs e) { layout = SaveLayoutAsString(); } } }
<Grid> <telerik:RadMap x:Name="mapControl" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Provider="{Binding MapProvider}" Center="{Binding MapLocation}"/> </Grid>
public class MapViewModel : ViewModelBase { const string _apiKey = "{key}"; private readonly IEventAggregator _eventAggregator; private BingGeocodeProvider _geocodeProvider; private MapProviderBase _mapProvider; public MapProviderBase MapProvider { get { return _mapProvider; } set { _mapProvider = value; } } private Location _mapLocation; public Location MapLocation { get { return _mapLocation; } set { _mapLocation = value; this.RaisePropertyChanged(() => this.MapLocation); } } public MapViewModel(IEventAggregator eventAggregator) { _eventAggregator = eventAggregator; _eventAggregator.GetEvent<Infrastructure.RequestPersonalDataEvent>().Subscribe(this.RequestPersonalDataEvent, ThreadOption.BackgroundThread); _mapProvider = new BingMapProvider(MapMode.Aerial, true, _apiKey); } public void RequestPersonalDataEvent(Infrastructure.Models.Person person) { this.Working = true; _geocodeProvider = new BingGeocodeProvider(_apiKey); _geocodeProvider.GeocodeCompleted += this.geocodeProvider_GeocodeCompleted; GeocodeRequest request = new GeocodeRequest(); request.Query = "Postcode"; _geocodeProvider.GeocodeAsync(request); } private void geocodeProvider_GeocodeCompleted(object sender, GeocodeCompletedEventArgs e) { MapLocation = e.Response.Results[0].Locations[0]; Working = false; } }Hi All!
I've created a DataGrid in "regular" WPF that supports groups and the items within a group are shown in a wrappanel. For this I could use the code below:
<DataGrid.ItemsPanel> <ItemsPanelTemplate> <WrapPanel IsItemsHost="True"/> </ItemsPanelTemplate> </DataGrid.ItemsPanel>
The result should look something like this:
Group one:
Item1 Item2 Item3 Item4
Item5 Item6
Group two:
Item7 Item8 Item9 Item10
Group three:
Item11
So my questions:
Is there a way to access the gridview's ItemsPanel to do something similar, or are there any alternativse in the gridview?
- OR -
Is there a more suitable control for this that can handle this many items and the result can look like the same?
Thanks in advance,
Istvan

