Telerik Forums
UI for WPF Forum
1 answer
94 views
Hi, I am using the tileview control that will bound to items at runtime.
When the tileview contains explicit tileitems like  shown below I am able to maximize / minimize the tiles and also have a scrool bar as expected.

<telerik:RadTileView Name="radTileView1" MinimizedRowHeight="200" MinimizedColumnWidth ="200" >

 

 

<telerik:RadTileViewItem></telerik:RadTileViewItem>

 

 

 

<telerik:RadTileViewItem></telerik:RadTileViewItem>

 

 

 

<telerik:RadTileViewItem></telerik:RadTileViewItem>

 

 

 

<telerik:RadTileViewItem></telerik:RadTileViewItem>

 

 

 

<telerik:RadTileViewItem></telerik:RadTileViewItem>

 

 

 

<telerik:RadTileViewItem></telerik:RadTileViewItem>

 

 

 

</telerik:RadTileView>

However , when I bind the tileview to using itemsource to a List of items like shown below, I am unable to maximize, minimize the tiles. What am I doing wrong ?

 

 

 

 

<telerik:RadTileView Name="radTileView1" ItemsSource="{Binding}"

 

 

 

 

MinimizedRowHeight="200" MinimizedColumnWidth ="200" >

 

 

 

 

 

</telerik:RadTileView>

Note: The user control that houses the tileview control has it's data context set to the list .The tileview does show the correct number of tiles corresponding to the number of items in the list, but does not let me maximize or minimize.

 

Zarko
Telerik team
 answered on 05 Apr 2011
2 answers
101 views
I develop some application and use RadRibbonbar with RadRibbonWindow.

I add RadDocking Window to the application.
It is okay in Windows 7's Aero Theme,
but if I change the theme to Windows classic theme, the application is just crushed..

it doesn't have any problem when I use RadDocking window and Default WPF Window together,
but with RadRibbonWindow, it happens.

I guess it cause using RadDocking and RadRibbonWindow together in Windows7's Classic Theme..
Is there any solution to resovle that?? Please help.
sangyun
Top achievements
Rank 1
 answered on 05 Apr 2011
2 answers
50 views
Urgent.... My client has a bug in production enviroment and he can
not do his work. This feature is important and I do not have any
workarround

 I am trying to draw something with splecialslot  style . But the
DataContext of highlightitem is changing incorrectly, and I can not
control the correct positioning of specific images with  databinding

<ctr:SpecialSlotStyleSelector x:Key="
SpecialSlotStyleSelector">
       <ctr:SpecialSlotStyleSelector.MarcaStyle>
           <Style TargetType="telerik:HighlightItem">
               <Setter Property="Panel.ZIndex" Value="20" />
               <Setter
Property="bv:HackIsHitTestVisible.IsHitTestVisible" Value="true"/>
               <Setter Property="Template">
                   <Setter.Value>
                       <ControlTemplate>
                           <Grid >
                               <Border  IsHitTestVisible="False"
Background="White" Opacity="0.25" >

                               </Border>
                               <Grid IsHitTestVisible="True"
telerik:RadDragAndDropManager.AllowDrag="True"
Background="Transparent" x:Name="root" HorizontalAlignment="Center">
                                   <Grid.InputBindings>
                                       <MouseBinding
MouseAction="LeftDoubleClick" CommandParameter="{Binding
Path=Marcador}" Command="app:AppCommands.ShowMarkEditVw"/>
                                   </Grid.InputBindings>
                                   <Grid.ColumnDefinitions>
                                       <ColumnDefinition
Width="auto"></ColumnDefinition>
                                   </Grid.ColumnDefinitions>
                                   <Image Margin="0,0,0,0"
Source="{Binding Imagem, Converter={StaticResource imageConverter}}"/>

                                   <telerik:RadButton Grid.Column="1"
x:Name="DeleteButton" Opacity="1" Visibility="Collapsed"
                                                                               CommandParameter="{Binding Path=Marcador.ID_ViaturasMarcadores}"
                                                                               Command="local:AppCommands.RemoveMark"
                                                                               HorizontalAlignment="Right" Height="11" Margin="1,1,-11,1" Padding="0"
                                                                               VerticalAlignment="Top" Width="11">
                                       <telerik:StyleManager.Theme>
                                           <telerik:Expression_DarkTheme />
                                       </telerik:StyleManager.Theme>
                                       <Path Data="M0,0L5,5 M5,0L0,5"
Stroke="#FFDDDDDD" />
                                   </telerik:RadButton>


                               </Grid>
                           </Grid>

                           <ControlTemplate.Triggers>
                               <Trigger Property="IsMouseOver"
Value="true" SourceName="root">
                                   <Setter Property="Visibility"
Value="Visible" TargetName="DeleteButton" />

                               </Trigger>
                           </ControlTemplate.Triggers>
                       </ControlTemplate>
                   </Setter.Value>
               </Setter>
           </Style>
       </ctr:SpecialSlotStyleSelector.MarcaStyle>
   </ctr:SpecialSlotStyleSelector>
Mário
Top achievements
Rank 1
 answered on 05 Apr 2011
2 answers
54 views
 Urgent.... My client has a bug in production enviroment and he can
not do his work. This feature is important and I do not have any
workarround

 I am trying to draw something with splecialslot  style . But the
DataContext of highlightitem is changing incorrectly, and I can not
control the correct positioning of specific images with  databinding

<ctr:SpecialSlotStyleSelector x:Key="
SpecialSlotStyleSelector">
       <ctr:SpecialSlotStyleSelector.MarcaStyle>
           <Style TargetType="telerik:HighlightItem">
               <Setter Property="Panel.ZIndex" Value="20" />
               <Setter
Property="bv:HackIsHitTestVisible.IsHitTestVisible" Value="true"/>
               <Setter Property="Template">
                   <Setter.Value>
                       <ControlTemplate>
                           <Grid >
                               <Border  IsHitTestVisible="False"
Background="White" Opacity="0.25" >

                               </Border>
                               <Grid IsHitTestVisible="True"
telerik:RadDragAndDropManager.AllowDrag="True"
Background="Transparent" x:Name="root" HorizontalAlignment="Center">
                                   <Grid.InputBindings>
                                       <MouseBinding
MouseAction="LeftDoubleClick" CommandParameter="{Binding
Path=Marcador}" Command="app:AppCommands.ShowMarkEditVw"/>
                                   </Grid.InputBindings>
                                   <Grid.ColumnDefinitions>
                                       <ColumnDefinition
Width="auto"></ColumnDefinition>
                                   </Grid.ColumnDefinitions>
                                   <Image Margin="0,0,0,0"
Source="{Binding Imagem, Converter={StaticResource imageConverter}}"/>

                                   <telerik:RadButton Grid.Column="1"
x:Name="DeleteButton" Opacity="1" Visibility="Collapsed"
                                                                               CommandParameter="{Binding Path=Marcador.ID_ViaturasMarcadores}"
                                                                               Command="local:AppCommands.RemoveMark"
                                                                               HorizontalAlignment="Right" Height="11" Margin="1,1,-11,1" Padding="0"
                                                                               VerticalAlignment="Top" Width="11">
                                       <telerik:StyleManager.Theme>
                                           <telerik:Expression_DarkTheme />
                                       </telerik:StyleManager.Theme>
                                       <Path Data="M0,0L5,5 M5,0L0,5"
Stroke="#FFDDDDDD" />
                                   </telerik:RadButton>


                               </Grid>
                           </Grid>

                           <ControlTemplate.Triggers>
                               <Trigger Property="IsMouseOver"
Value="true" SourceName="root">
                                   <Setter Property="Visibility"
Value="Visible" TargetName="DeleteButton" />

                               </Trigger>
                           </ControlTemplate.Triggers>
                       </ControlTemplate>
                   </Setter.Value>
               </Setter>
           </Style>
       </ctr:SpecialSlotStyleSelector.MarcaStyle>
   </ctr:SpecialSlotStyleSelector>
Mário
Top achievements
Rank 1
 answered on 05 Apr 2011
2 answers
191 views
Hi,telerik.
    Here is a problem of the Docking Loadlayout.
    First, click the "Add New Item" button add some panel.
    Second,click the "Save Layout".At this time,click "Add New Item" button can add a panel to Docking.
    Now, click the "Load Layout" button,then click the "Add New Panel" button,there is no panel added to the Docking...
    Oh,the Title should be:"Can't Add a new RadPane to Docking After LoadLayout"

Here is the xaml
<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>




And here is the cs code
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();
        }
    }
}

George
Telerik team
 answered on 05 Apr 2011
1 answer
58 views
Is it possible to use BingGeocodeProvider without setting the .MapControl property? I'm using Prism with WPF and I want to be able to create the location for the map in the view model, and databind the RadMap control 'Centre' property to my view model 'MapLocation' property. Currently I get the following error.

System.Exception was unhandled
  Message=Routing Service Exception: Route Service Exception: Object reference not set to an instance of an object.
  Source=Telerik.Windows.Controls.DataVisualization
  StackTrace:
       at Telerik.Windows.Controls.Map.BingGeocodeProvider.GeocodeAsync(GeocodeRequest request) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\DataVisualization\Map\Providers\Geocode\BingGeocodeProvider.cs:line 88
       at DataAggregator.Modules.Cube.ViewModels.MapViewModel.RequestPersonalDataEvent(Person person)
       at Microsoft.Practices.Prism.Events.BackgroundEventSubscription`1.<>c__DisplayClass5.<InvokeAction>b__4(Object o)
       at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
       at System.Threading.ExecutionContext.runTryCode(Object userData)
       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
       at System.Threading.ThreadPoolWorkQueue.Dispatch()
       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
  InnerException:

Example XAML (with some bits removed to keep it simple)

 

 

 

 

<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;
       }
   }
Andrey
Telerik team
 answered on 05 Apr 2011
1 answer
230 views
I want to Export All data from a RadGridView in a XML file but HOW TO ??????????
Please Help Me..
Vanya Pavlova
Telerik team
 answered on 05 Apr 2011
1 answer
109 views

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>
Unfortunately it is way too slow for us. We would like to handle about a 1000 items and we are evaluating Telerik grid for that but I could not find a way to reproduce what I need. Each item should be represented with an image on the left, three lines of text on the right and a progress bar in the background. Grouping, sorting and filtering of items should be available (or at least not too complex to implement), hence the items source is a ListCollectionView. I did this in the original approach with a cell template and this works fine in both the "regular" DataGrid and in Telerik's GridView, but in the Telerik version I can't make the cell items appear next to each other.

 

 

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

Vlad
Telerik team
 answered on 05 Apr 2011
2 answers
130 views
I want to be able to create a button that when pressed will scroll the grid down to the next set of rows that were not visible. e.g. if the grid is showing 10 rows, pressing the button will scroll the grid down till row 11 is the top row.

I've tried using selecteditem but the grid doesn't focus on the row. Also is there a way to iterate through the rows to get their heights so I know which ones are visible or not?
Joshua
Top achievements
Rank 1
 answered on 04 Apr 2011
0 answers
84 views
I want to Extract all Data From RadGridView And Store into a DataTable.
Please Helppppppp
Md.Hasanuzzaman
Top achievements
Rank 1
 asked on 04 Apr 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?