Telerik Forums
UI for WPF Forum
1 answer
139 views
i have used a RadTileView, 
<UserControl
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
             x:Class="DemoShow.usercontrol.UserControl1" 
             mc:Ignorable="d" >
    <UserControl.Resources>

        <Style x:Key="TextBoxThumb" TargetType="TextBox">
            <Style.Triggers>
                <Trigger Property="IsEnabled" Value="true">
                    <Setter Property="BorderThickness" Value="1,1,1,1" />
                </Trigger>
                <Trigger Property="IsEnabled" Value="false">
                    <Setter Property="BorderThickness" Value="0,0,0,0"/>
                </Trigger>
            </Style.Triggers>
        </Style>

        <DataTemplate x:Key="headerTemplate">
            <TextBlock Text="{Binding Number}" />
        </DataTemplate>
        <DataTemplate x:Key="contentTemplate">
            <Grid Margin="5">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <TextBox Grid.Row="0" Style="{StaticResource TextBoxThumb}" IsEnabled="{Binding Path=ShowFlag,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"  Text="{Binding Name,Mode=TwoWay}" />
                <TextBox Grid.Row="1" Style="{StaticResource TextBoxThumb}" IsEnabled="{Binding Path=ShowFlag,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Text="{Binding Birthday,Mode=TwoWay}" />
                <TextBox Grid.Row="2" Style="{StaticResource TextBoxThumb}" IsEnabled="{Binding Path=ShowFlag,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Text="{Binding age,Mode=TwoWay}" />
                <TextBox Grid.Row="3" Style="{StaticResource TextBoxThumb}" IsEnabled="{Binding Path=ShowFlag,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Text="{Binding Sex,Mode=TwoWay}" />
                <TextBox Grid.Row="4" Style="{StaticResource TextBoxThumb}" IsEnabled="{Binding Path=ShowFlag,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Text="{Binding CheckType,Mode=TwoWay}" />
                <TextBox Grid.Row="5" Style="{StaticResource TextBoxThumb}" IsEnabled="{Binding Path=ShowFlag,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Text="{Binding Time,Mode=TwoWay}" />
                <Button Grid.Row="5"  Content="123" >
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="Click">
                            <i:InvokeCommandAction  Command="{Binding DataContext.LoginCommand,RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type UserControl}, AncestorLevel=1}}"
                                CommandParameter="{Binding Name}"
                                />
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                </Button>

            </Grid>
        </DataTemplate>
    </UserControl.Resources>
    <Grid>
        <telerik:RadTileView  
                         IsAutoScrollingEnabled="True"
                    IsDockingEnabled="True"
                    IsVirtualizing="True"
                         ColumnsCount="2"
                         RowHeight="200"
                         ColumnWidth="300"
                         MinimizedColumnWidth="300"
                         MinimizedRowHeight="200"
                         MinimizedItemsPosition="Bottom"
                         ContentTemplate="{StaticResource contentTemplate}"
                    ItemsSource="{Binding Path=Items,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                    ItemTemplate="{StaticResource headerTemplate}"
                    PreservePositionWhenMaximized="False"
                    TileStateChangeTrigger="SingleClick">
        </telerik:RadTileView>

    </Grid>

</UserControl>

i change the BindingList<People>

  public class MainViewModel : ViewModelBase
    {
        private BindingList<People> items;
        private BindingList<People> itemstem;

        public ICommand LoginCommand
        {
            get
            {
                return new RelayCommand<object>(
                    (parameter) =>
                    {
                        ChangeInputEnable(parameter);
                    }
                    );
            }
        }

ui not update      public class People
    {
        public string Name { get; set; }
        public string Birthday { get; set;}
        public string age { get; set; }
        public string Sex { get; set; }
        public string CheckType { get; set; }
        public string Time { get; set; }
        public string Number { get; set; }
        public bool ShowFlag { get; set; }
    }

        private void ChangeInputEnable(object parameter)
        {

            //string str = parameter.ToString();
            //var obj = items.FirstOrDefault(x => x.Name == str);
            //int n = items.IndexOf(obj);
            //MessageBox.Show(items[n].ShowFlag.ToString());
            //if (obj != null)
            //{
            //    if (obj.ShowFlag) obj.ShowFlag = false;
            //    else obj.ShowFlag = true;

            //    RaisePropertyChanged("ShowFlag");
            //    RaisePropertyChanged("Items");
            //    MessageBox.Show(items[n].ShowFlag.ToString());
            //    MessageBox.Show(str);
            //}


            string str = parameter.ToString();
            var obj = items.FirstOrDefault(x => x.Name == str);
            int n = items.IndexOf(obj);
            if (obj != null)
            {
                if (obj.ShowFlag) obj.ShowFlag = false;
                else obj.ShowFlag = true;
                obj.Name += "tttt";
                items.ListChanged += (o, e) => RaisePropertyChanged(("Items"));

                itemstem = items;
                items = null;
                items = itemstem;
                RaisePropertyChanged("Name");
                
                RaisePropertyChanged("Items");
            }


            //items.Add(new People()
            //{
            //    Birthday = "1985-08-08",
            //    age = "38",
            //    Sex = "Male",
            //    CheckType = "PET-CT",
            //    Time = "10:30",
            //    Name = "tttt",
            //    Number = "10"
            //});

            //RaisePropertyChanged("Items");


        }

        public MainViewModel()
        {
            List<People> itemsSource = new List<People>();
            for (int i = 0; i < 5; i++)
            {
                itemsSource.Add(new People()
                {
                    Birthday = "1985-08-08",
                    age = "38",
                    Sex = "Male",
                    CheckType = "PET-CT",
                    Time = "10:30",
                    Name = this.names[i % 12],
                    Number = i.ToString(),
                    ShowFlag =true
                });
            }

            this.items = new BindingList<People>(itemsSource);
        }


        public BindingList<People> Items
        {
            get
            {
                return this.items;
            }
            set
            {
                this.items =value;
                RaisePropertyChanged("Items");
            }
        }

        private List<string> names = new List<string>
        {
            "Andrew Fuller",
            "Martin Sommer",
            "Anne Dogsworth",
            "Steven Buchanan",
            "Janet Leverling",
            "Michael Suyama",
            "Margaret Peacock",
            "Robert King",
            "John Steel",
            "Laura Gallahan",
            "Nancy Davolio",
            "Ann Devon"
        };
    }

can you help me ?

Pavel R. Pavlov
Telerik team
 answered on 17 Sep 2013
4 answers
234 views
hi there,

I would need more power with this control. I mean, being able to show more buttons would be great. I wonder, is it possible?
My aim is display a button where the user can save the images and their later treatment against my RDBMS (Sql2k8)

Also I would fancy show a Context Menu on the bare surface of the control.

Telerik 2013 Q1 NET 4.5 for WPF.

Thanks in advance,
Enric
Top achievements
Rank 1
 answered on 17 Sep 2013
2 answers
162 views
Hi,

i have a GridView binded to an observable collection of "items" and its SelectedItem property binded to an item in the ViewModel.

Example to explain the behavior that I want to avoid:

I have 3 items in the collection and in the grid I've selected the second row, corresponding to the second element of the collection.
If I add a new element in the collection, the gridview automatically adds a new row for it (and thats ok) and select this new row (which is not ok for me, in this case I want to keep the selection on the second row)

Any idea to achieve this?

Thanks

John
Top achievements
Rank 1
 answered on 17 Sep 2013
1 answer
190 views
I'm trying to figure out how to use a Telerik ListBox control for an application that I'm writing. For some reason I can't view any of the Telerik demos (they're all timing out on me), and so I've been searching around this site for other help. I came across this page on drag-and-drop for the ListBox, and it looks really promising. However, in reading through the code on the page I came across their ProductToOrderConverter class. It inherits (or implements, I'm not sure which) from something called a DataConverter. What is that?? Even on this site I'm having a hard time finding any documentation on what the dataconverter class/interface is.
Rosen Vladimirov
Telerik team
 answered on 17 Sep 2013
8 answers
160 views
Is there a built in method (or plans to implement) to lock tiles assigned to a particular group from being dragged to another group?  For instance, say I have a series of tiles associated with the group Music, and another series of tiles associated with the group Movies.  I would like to prevent these tiles from being moved between groups.
Yordanka
Telerik team
 answered on 17 Sep 2013
1 answer
290 views
Hi,

It's the first time I'm using Implicit Styles and NoXaml so I'm sure I'm doing something wrong and I hope someone can help me. 

I have a Prism project. At main WPF application project, I have added references for all dll I need in all modules. Currently, I've added the following ones:
Telerik.Windows.Controls;
Telerik.Windows.Controls.Charts;
Telerik.Windows.Controls.Data;
Telerik.Windows.Controls.Input;
Telerik.Windows.Controls.Navigation;
Telerik.Windows.Controls.ScheduleView;
Telerik.Windows.Data;

At this project, at App.xaml I've merged the following xaml files (the xaml files Telerik WPF extensions added at Themes folder
<ResourceDictionary.MergedDictionaries>
                 
                <!-- Telerik.Windows.Controls is used by all assemblies -->
                <ResourceDictionary Source="Themes\Windows8Touch\Telerik.Windows.Controls.xaml" />
 
                <!--<ResourceDictionary Source="Themes\Windows8Touch\System.Windows.xaml" />-->
                <ResourceDictionary Source="Themes\Windows8Touch\Telerik.Windows.Controls.Input.xaml" />
 
                <!-- Requires: System.Windows.xaml -->
                <ResourceDictionary Source="Themes\Windows8Touch\Telerik.Windows.Controls.Navigation.xaml" />
 
                <ResourceDictionary Source="Themes\Windows8Touch\Telerik.Windows.Controls.Chart.xaml" />
 
                <!-- Requires: Telerik.Windows.Controls.Input -->
                <ResourceDictionary Source="Themes\Windows8Touch\Telerik.Windows.Controls.Data.xaml" />
                
                <!-- Requires: System.Windows, Telerik.Windows.Controls.Input, Telerik.Windows.Controls.Navigation -->
                <ResourceDictionary Source="Themes\Windows8Touch\Telerik.Windows.Controls.ScheduleView.xaml" />
                 
            </ResourceDictionary.MergedDictionaries>


Now, I have one module (in a separated project) that has references to:
Telerik.Windows.Controls;
Telerik.Windows.Controls.Data;
Telerik.Windows.Controls.Input;
Telerik.Windows.Controls.Navigation;
Telerik.Windows.Data;

One of the Views in this module contains a RadDataform but it's DataFields are not visible when View appears at UI. I've tried to use DataFormDataField control alone with no success. Am I missing something?

Thanks.



Ivan Ivanov
Telerik team
 answered on 17 Sep 2013
1 answer
263 views
I'v setup applied a custom style to a RadAutoCompleteBox in order to change its visual design. I would also like to customize its RadAutoCompleteBoxItems (e.g. change the RemoveButton). How can this be achieved?

I found a RadAutoCompleteBoxItemStyle in the built-in Themes but it seems like this style is set globally. Which property of the RadAutoCompleteBox can I use to override this default style?

Thanks for your help
Matthias
Masha
Telerik team
 answered on 17 Sep 2013
1 answer
102 views

Hi all of you,

I'm using this control under trial license. I'm trying to do a very simple binding but it doesn't work at all:

xaml header:

Here you can see the reference to one of my RESX files (I've got one for English and another one for Spanish where every key is named alike.
Names of resources files:

MasterGIT.resx and MasterGIT.en.resx

This line uses one RESX under criteria language:

     ResxExtension.DefaultResxName="GIT_CuadroMando.MasterGIT" Language="{UICulture}"

 

 

<Window

        ResxExtension.DefaultResxName="GIT_CuadroMando.MasterGIT" Language="{UICulture}"

    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"  x:Class="GestorDocumental"

 

    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Loaded="Window_Loaded"

    xmlns:local="clr-namespace:GIT_CuadroMando"

    xmlns:commands="clr-namespace:Telerik.Windows.Media.Imaging.ImageEditorCommands.RoutedCommands;assembly=Telerik.Windows.Controls.ImageEditor"       

    xmlns:tools="clr-namespace:Telerik.Windows.Media.Imaging.Tools;assembly=Telerik.Windows.Controls.ImageEditor"

    Title="{Resx TitleGestorDocumental}" Height="701" Width="1000" ResizeMode="CanResize" WindowStyle="ToolWindow">

 

 

<telerik:RadImageEditorUI x:Name="BodyWorkAndPaintingTool" Grid.ColumnSpan="4" Margin="10,49,33,10" Grid.Row="1" Grid.RowSpan="4">

          <telerik:RadImageEditorUI.ImageToolsSections>

              <telerik:ImageToolsSection Header="{Resx Disenador_Blur}"  >

 

                  <telerik:ImageToolItem ImageKey="Resize" Text="Resize" Command="commands:ImageEditorRoutedCommands.ExecuteTool">

                      <telerik:ImageToolItem.CommandParameter>

                          <tools:ResizeTool x:Name="resizeTool"/>

                      </telerik:ImageToolItem.CommandParameter>

                  </telerik:ImageToolItem>

 

                  <telerik:ImageToolItem ImageKey="Resize" Text="Canvas resize" Command="commands:ImageEditorRoutedCommands.ExecuteTool">

                      <telerik:ImageToolItem.CommandParameter>

                          <tools:CanvasResizeTool/>

                      </telerik:ImageToolItem.CommandParameter>

                  </telerik:ImageToolItem>

 

 
code-behind:

Private Sub Window_Loaded(sender As Object, e As RoutedEventArgs)

 

        CultureManager.UICulture = Thread.CurrentThread.CurrentCulture

'        Thread.CurrentThread.CurrentUICulture = New CultureInfo("es")

 

    End Sub

 

Petya
Telerik team
 answered on 17 Sep 2013
11 answers
300 views
private void diagram_ConnectionManipulationCompleted(object sender, ManipulationRoutedEventArgs e)
{
     Here, e.Connector may be null. Why?!
}

Some times, when I drag a connection from a node and then release it before attaching to another connector, the ConnectionManipulationCompleted event is fired with its Connector set to null. It happens maybe 1 out of 10 tries, but after it has occurred it seems to happen more often until I press ESC or perform some other reset operation.

How should I interpret this? Is it a bug or is this a valid state?

UPDATE:
This event is usually not fired when I do the above. Only when it does indeed fire, this weird state is seen. I believe this event is erroneously called from within your code. Also, e.ManipulationStatus is set to ManipulationStatus.Moved. Obviously, I did not move a connection...
Kristoffer
Top achievements
Rank 1
 answered on 17 Sep 2013
1 answer
72 views
Hello, I want to be able to modify the size of the area in which tile view control expands or is maximized. How can I do this?
Tina Stancheva
Telerik team
 answered on 17 Sep 2013
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?