Telerik Forums
UI for WPF Forum
0 answers
67 views

I’m performing a Drag and Drop between two grids. The row is not removed from the first grid after the drop is completed.  Both the grids have the same ObservableCollection. Did anyone notice this behavior?

RJ

RJ
Top achievements
Rank 1
 asked on 08 Oct 2010
6 answers
97 views
Hello,

I've got a GridView with four interlaced ChildGridViews. Each GridView contains some different and some identical columns. The identical containing numbers and are arranged right. The columns that are different in each GV are arranged left. My intention is to get all the number-columns below the others.

I have tried to insert a column with width="*" before the right arranged columns start. But that don't works. The stretching function does not consider the width of the child GridViews. So the columns are not below the others.

What can I do to get this work?
Maya
Telerik team
 answered on 08 Oct 2010
1 answer
24 views
Hello,

I've got a DataGridView with binding to objects in a ObservableCollection. The columns are binded to the attributes of the class.
When I change a value in column a the value of column b should be changed in dependence of the new value in column b. The value of column b is binded to an attribute too.

Column a contains the item number, column b should contain the item name. The item names are stored in hashtable (key = item number).

I hope my English is understandable.

Thank you very much!
Best regards

Markus
Maya
Telerik team
 answered on 08 Oct 2010
1 answer
226 views
Hi,
   Is is possible to style gauge as a analog clock but something like stopwatch. I need to freeze two hands (in different color) when the stopwatch started and other two hands will show time ellapsed?

Example is aprriciated.

Thank you
Andrey
Telerik team
 answered on 08 Oct 2010
1 answer
190 views
How can I validate by row in RadGridView like is done with standart WPF components here: http://www.codeproject.com/KB/WPF/WPFDataGridExamples.aspx#errorinfo


Is it possible to force the validatation of the entire grid when a single row is updated/removed?


Thanks
Veselin Vasilev
Telerik team
 answered on 08 Oct 2010
1 answer
120 views
Hi,

I am trying to display an image and a textblock in a radcombo box control nested within a radtreeview. The radcombox's itemssource is set to value that contains a text property and bitmapimage. I set the source for the image to the bitmapimage stored in the radcombox's itemsource. When the radcombox is expanded and displayed the text displays but the image does not display.

Here is a sample of the radcomboxes item templates:

 

 

 

<telerik:RadComboBox x:Name="rcbImages" VerticalAlignment="Center" IsEnabled="False" SelectedValue="{Binding Condition}" Visibility="Hidden" telerik:StyleManager.Theme="Office_Blue" Width="150" Grid.Column="5">

 

 

 

 

<telerik:RadComboBox.SelectionBoxTemplate>

 

 

 

 

<DataTemplate>

 

 

 

 

<Grid>

 

 

 

 

<Grid.ColumnDefinitions>

 

 

 

 

<ColumnDefinition Width="*" />

 

 

 

 

<ColumnDefinition Width="40" />

 

 

 

 

</Grid.ColumnDefinitions>

 

 

 

 

<TextBlock Grid.Column="1" Text="{Binding Key.Description}" />

 

 

 

 

<Image Grid.Column="0" Source="{Binding Value}">

 

 

 

 

</Image>

 

 

 

 

</Grid>

 

 

 

 

</DataTemplate>

 

 

 

 

</telerik:RadComboBox.SelectionBoxTemplate>

 

 

 

 

<telerik:RadComboBox.ItemTemplate>

 

 

 

 

<DataTemplate>

 

 

 

 

<Grid>

 

 

 

 

<Grid.ColumnDefinitions>

 

 

 

 

<ColumnDefinition Width="*" />

 

 

 

 

<ColumnDefinition Width="40" />

 

 

 

 

</Grid.ColumnDefinitions>

 

 

 

 

<TextBlock Grid.Column="1" Text="{Binding Description}" />

 

 

 

 

<Image Grid.Column="0" Source="{Binding Value}" Initialized="Image_Initialized" Loaded="Image_Loaded" ImageFailed="Image_ImageFailed">

 

 

 

 

</Image>

 

 

 

 

</Grid>

 

 

 

 

</DataTemplate>

 

 

 

 

</telerik:RadComboBox.ItemTemplate>

 

 

 

 

</telerik:RadComboBox>

 



And here is a sample of the code to get the image and the setting of the itemsource for the combox:

 

 

BitmapImage bitimage = new BitmapImage();

 

bitimage.BeginInit();

bitimage.StreamSource =

 

new System.IO.MemoryStream(images[i].ImageValue);

 

bitimage.EndInit();

images[i].Image = bitimage;

 

 

 

Dictionary<ImageType, BitmapImage> dicImages = new Dictionary<ImageType, BitmapImage>();

 

 

 

for (int i = 0; i < images.Count; i++)

 

{

dicImages.Add(images[i], images[i].Image);

}

combo.SelectedValuePath =

 

"Key.ImageKey";

 

combo.ItemsSource = dicImages;

combo.IsEnabled =

 

true;

Any help would be greatly appreciated.

Thanks,

Jonathan

 

Civbaron
Top achievements
Rank 1
 answered on 08 Oct 2010
5 answers
205 views
Hai,
    I am using 2D Bar Chart. I want to show the first value in XAxis As Blue and Second value in XAxis as Red. And also i have to show Blue(In 0) as "String1" and Red(in 1) as "String2" in ChartArea.How can i do this?

Thanks in advance.
Evgenia
Telerik team
 answered on 07 Oct 2010
5 answers
372 views
I am evaluating Telerik for use in a WPF 4.0 app I am creating.  So far most of the replacement of MS controls has gone smoothly but I am struggling with the tabcontrol some.  I am using MVVM.  I have a view model which has a collection of other viewmodels.  My tabcontrol is bound to the collection of viewmodels.  I want my tabcontrol to show its content based on the viewmodel created/selected.  I have DataTemplates set up that are tied to the class type of the viewmodels in the collection.  This works great with the MS Tabcontrol but does not seem to work with the RadTabControl.  Does the RadTabControl only support one type of content?  My view collection starts out with two items in it, a DeviceInventoryListViewModel and an AccountMaintenanceListViewModel, the DeviceInventoryList view is shown correctly as the initial tab content but when I click on the Account tab it tries to coerce the contents of the AccountListViewModel into the Device view rather than creating new content with the AccountMaintenanceList view and I get an error about Accounts not being able to be set to Devices (or something similar).

I have the following set up in my Application.xaml:
<P><DataTemplate DataType="{x:Type vm:DeviceInventoryListViewModel}"
<BR> <local:DeviceInventoryList/> <BR></DataTemplate
<BR><DataTemplate DataType="{x:Type vm:AccountMaintenanceListViewModel}"
<BR> <local:AccountMaintenanceList /> <BR></DataTemplate></P>

My ShellViewModel is as follows:
Public Class ShellViewModel
    Inherits ViewModelBase

    Private _openviews As ObservableCollection(Of ViewModelBase)
    Private _currentview As ViewModelBase

    Public ReadOnly Property Views As ObservableCollection(Of ViewModelBase)
        Get
            If _openviews Is Nothing Then
                _openviews = New ObservableCollection(Of ViewModelBase)
                 AddHandler _openviews.CollectionChanged, AddressOf ViewCollectionChanged
                 LoadDefaultViews()
            End If
            Return _openviews
        End Get
    End Property
 
    Private Sub LoadDefaultViews()
        _openviews.Add(New DeviceInventoryListViewModel)
        _openviews.Add(New AccountMaintenanceListViewModel)
        _currentview = _openviews.Item(0)
    End Sub

 
   Public Property SelectedView As ViewModelBase
         Get
             Return _currentview
         End Get
         Set(ByVal value As ViewModelBase)
            _currentview = value
            OnPropertyChanged("SelectedView")
        End Set
    End Property
End Class

And then my ShellView has its DataContext set to an instance of my ShellViewmodel and the XAML contains the following:

<telerik:RadTabControl Grid.Row="1" ItemsSource="{Binding Views}"  
    SelectedItem="{Binding SelectedView}" />
Tina Stancheva
Telerik team
 answered on 07 Oct 2010
1 answer
140 views
I´m working on an app with the following architecture, I´m using CSLA .NET 4, BXF for plumbing to MVVM and WPF.

Files code follow:

TreeviewView.xaml
------------------------
<UserControl x:Class="MyAppDesktopWPF.TreeviewView"       
         
         
xmlns:Telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
        xmlns:csla="clr-namespace:Csla.Data;assembly=Csla"
        mc:Ignorable="d"
        d:DesignHeight="300" d:DesignWidth="400"
Loaded="UserControl_Loaded"
xmlns:my="clr-namespace:MyAppDesktopWPF.ViewModels">

<UserControl.Resources>

<
CollectionViewSource x:Key="TreeAreaDS" Source="{Binding
Source={StaticResource TrashViewModel},
Path=Model}"></CollectionViewSource>

<
HierarchicalDataTemplate x:Key="ToolsDataTemplate"ItemsSource="{Binding Tools}" >
            <TextBlock Text="{Binding Path=Name}" FontWeight="Bold"/>
</
HierarchicalDataTemplate>

        <HierarchicalDataTemplate x:Key="SegmentsDataTemplate"
ItemsSource="{Binding Segments}" ItemTemplate="{StaticResource ToolsDataTemplate}" >
            <TextBlock Text="{Binding Path=Name}" FontWeight="Bold"/>
        </HierarchicalDataTemplate>

        <HierarchicalDataTemplate  x:Key="SectionsDataTemplate" 
ItemsSource="{Binding Sections}" ItemTemplate="{StaticResource
SegmentsDataTemplate}">
            <TextBlock Text="{Binding Path=Name}"
FontWeight="Bold"/>
        </HierarchicalDataTemplate>

    </UserControl.Resources>

<Telerik:RadTreeView ItemsSource="{Binding Source={StaticResource
TreeAreaDS}}" ItemTemplate="{StaticResource SectionsDataTemplate}"
Name="PlanTreeView" Height="250" HorizontalAlignment="Left" Margin="3"
VerticalAlignment="Center" Width="150" />

TrashViewModel.cs
------------------------
public class TrashViewModel : ViewModel<MyAppBO.MyClass>
    {
        public TrashViewModel()
        {
            Bxf.Shell.Instance.ShowStatus(new Bxf.Status { Text =
"Getting Plan", IsBusy = true });
            ManageObjectLifetime = true;
            // cascade model changed events through VM to View
            Model.PropertyChanged += (o, e) =>
OnPropertyChanged(e.PropertyName);
        }

        public TrashViewModel(MyClass classInstance)
        {
            Bxf.Shell.Instance.ShowStatus(new Bxf.Status { Text =
"Getting Plan", IsBusy = true });
            ManageObjectLifetime = true;
            Model = classInstance;

            // cascade model changed events through VM to View<br>
            Model.PropertyChanged += (o, e) =>
OnPropertyChanged(e.PropertyName);
        }


With this version of the code I get an exception that says:
"'Provide value on 'System.Windows.Markup.StaticResourceHolder' threw an exception.' Line number '108' and line position '50'."
---------------------
However if I change the code for the collectionviewsource to:
  <CollectionViewSource x:Key="TreeAreaDS"
Source="TrashViewModel">
</CollectionViewSource>


I get this:
Locating source for 'c:\Builds\WPF_Scrum\Release_WPF_2010_Q2_SP2\Sources\Development\Core\Controls\Animation\AnimationManager.cs'. Checksum: MD5 {d5 92 43 67 7f ad 5a 42 93 7e b9 53 ee b2 ef 99}
The file 'c:\Builds\WPF_Scrum\Release_WPF_2010_Q2_SP2\Sources\Development\Core\Controls\Animation\AnimationManager.cs' does not exist.
Looking in script documents for 'c:\Builds\WPF_Scrum\Release_WPF_2010_Q2_SP2\Sources\Development\Core\Controls\Animation\AnimationManager.cs'...
Looking in the projects for 'c:\Builds\WPF_Scrum\Release_WPF_2010_Q2_SP2\Sources\Development\Core\Controls\Animation\AnimationManager.cs'.
The file was not found in a project.
Looking in directory 'C:\Program Files\Microsoft Visual Studio 10.0\VC\crt\src\'...
Looking in directory 'C:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\src\mfc\'...
Looking in directory 'C:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\src\atl\'...
Looking in directory 'C:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\include\'...
The debug source files settings for the active solution indicate that the debugger will not ask the user to find the file: c:\Builds\WPF_Scrum\Release_WPF_2010_Q2_SP2\Sources\Development\Core\Controls\Animation\AnimationManager.cs.
The debugger could not locate the source file 'c:\Builds\WPF_Scrum\Release_WPF_2010_Q2_SP2\Sources\Development\Core\Controls\Animation\AnimationManager.cs'.

???
Any ideas?
I could try setting up a demo project, but I´d expose too much of the BL of the app and my employer wouldn´t like that..

Alex Fidanov
Telerik team
 answered on 07 Oct 2010
2 answers
117 views
Hello friends,

could you tell me how I can set the alignment for the content of the FooterCells?
I tried to set it with style. That works, but the result is not very fine (screenshot hc_466.jpg).

<Style TargetType="{x:Type telerik:GridViewFooterCell}">
    <Setter Property="HorizontalAlignment" Value="Right"/>
</Style>

How is it possible to fill out the whole cells with white background? Setting the background-property via style does not work.

Second question: When I use grouping and ColumnFooters (ShowGroupFooters ="False" ShowColumnFooters="True") the aggregatresults are shown in the header too. That's not very pretty. Is it possibly to disable this? (screenshot hc_465.jpg).

Thank you for your help!

Best regards
Markus
Markus
Top achievements
Rank 1
 answered on 07 Oct 2010
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
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
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
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?