<UserControl x:Class="WpfApplication1.CarouselItem" |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
MouseDown="UserControl_MouseDown" |
Width="120" > |
<Grid> |
<Grid.RenderTransform> |
<ScaleTransform ScaleX="1" ScaleY="1" /> |
</Grid.RenderTransform> |
<Grid.Style> |
<Style TargetType="Grid"> |
<Style.Triggers> |
<Trigger Property="IsMouseOver" Value="True"> |
<Trigger.EnterActions> |
<BeginStoryboard> |
<Storyboard> |
<DoubleAnimation |
Storyboard.TargetProperty="(Grid.RenderTransform).(ScaleTransform.ScaleX)" |
To="2" |
BeginTime="0:0:0.5" |
Duration="0:0:0.3"/> |
<DoubleAnimation |
Storyboard.TargetProperty="(Grid.RenderTransform).(ScaleTransform.ScaleY)" |
To="2" |
BeginTime="0:0:0.5" |
Duration="0:0:0.3"/> |
</Storyboard> |
</BeginStoryboard> |
</Trigger.EnterActions> |
<Trigger.ExitActions> |
<BeginStoryboard> |
<Storyboard> |
<DoubleAnimation |
Storyboard.TargetProperty="(Grid.RenderTransform).(ScaleTransform.ScaleX)" |
To="1" |
Duration="0:0:0.3"/> |
<DoubleAnimation |
Storyboard.TargetProperty="(Grid.RenderTransform).(ScaleTransform.ScaleY)" |
To="1" |
Duration="0:0:0.3"/> |
</Storyboard> |
</BeginStoryboard> |
</Trigger.ExitActions> |
</Trigger> |
</Style.Triggers> |
</Style> |
</Grid.Style> |
<Border |
CornerRadius="5" |
BorderBrush="Black" |
BorderThickness="2"> |
<Image Source="pics\GreenDoor.png" Stretch="Fill" /> |
</Border> |
</Grid> |
</UserControl> |
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; |
namespace WpfApplication1 |
{ |
/// <summary> |
/// Interaction logic for UserControl1.xaml |
/// </summary> |
public partial class CarouselItem : UserControl |
{ |
public delegate void ItemsMouseDown(object sender); |
public event ItemsMouseDown ItemMouseDown; |
public CarouselItem() |
{ |
try |
{ |
InitializeComponent(); |
} |
catch (Exception ex) |
{ |
MessageBox.Show(ex.ToString()); |
} |
} |
private void UserControl_MouseDown(object sender, MouseButtonEventArgs e) |
{ |
if (ItemMouseDown != null) |
ItemMouseDown(this); |
} |
} |
} |
ScrollViewer.HorizontalScrollBarVisibility
="Visible" ScrollViewer.VerticalScrollBarVisibility="Visible"
ScrollViewer.CanContentScroll="True"
and this is grouped event handler:
private void WipGrid_Grouping(object sender, GridViewGroupingEventArgs e)
{
try
{
var countFunction = new CountFunction();
countFunction.Caption =
"Total records: ";
countFunction.FunctionName =
"Count";
e.GroupDescriptor.AggregateFunctions.Add(countFunction);
}
<Page x:Class="Page1" |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" |
xmlns:carousel="clr-namespace:Telerik.Windows.Controls.Carousel;assembly=Telerik.Windows.Controls.Navigation" |
Title="Page1"> |
<Grid> |
<telerik:RadCarousel x:Name="carPacientes" HorizontalAlignment="Stretch" |
VerticalAlignment="Stretch" Background="Black" AutoGenerateDataPresenters="False" Foreground="White"> |
<telerik:RadCarousel.Resources> |
<Style TargetType="telerik:CarouselItem"> |
<Setter Property="Template"> |
<Setter.Value> |
<ControlTemplate TargetType="telerik:CarouselItem"> |
<Label Content="{Binding Path=Apellidos}" FontSize="12" Foreground="Black" Background="Aqua" /> |
</ControlTemplate> |
</Setter.Value> |
</Setter> |
</Style> |
</telerik:RadCarousel.Resources> |
</telerik:RadCarousel> |
</Grid> |
</Page> |
Imports MDOL.Business.Logic |
Partial Public Class Page1 |
Public Shared opcion As String |
Public Sub New() |
InitializeComponent() |
Dim pacs As List(Of Paciente) = New List(Of Paciente) |
Dim pac As Paciente = Nothing |
For i = 1 To 10 |
pac = New Paciente |
pac.IdPaciente = Convert.ToString(i) |
pac.Nombre = "Gerard" |
pac.Apellidos = "Subirana" |
pacs.Add(pac) |
pac = Nothing |
Next |
Me.carPacientes.ItemsSource = pacs |
End Sub |
End Class |
<telerik:RadGridView
telerik:StyleManager.Theme="Vista"
IsReadOnly="True"
ScrollMode="RealTime" />
Is this a known behavior or am I missing something?
Is there a way to fix this?
Thanks,
David
Hi,
I am using RADTreeview and I would like to bind the heterogeneous data as the hierarchal structure. For e.g. I want to bind List<A> which has List<B> and List<C> as its children.
Regards,
-Kshama