Telerik Forums
UI for WPF Forum
3 answers
189 views
Hi,
 is it possible to template the XAxis item label displayed to replace them by an icon ?

I have found 
<telerik:ChartArea.AxisX>
  <telerik:AxisX x:Uid="telerik:AxisX_1">
    <telerik:AxisX.AxisStyles>
      <telerik:AxisStyles ItemLabelStyle="{StaticResource StrategyMinItemLabelStyle}" />
    </telerik:AxisX.AxisStyles>
  </telerik:AxisX>
</telerik:ChartArea.AxisX>
But what is the targettype of my   StrategyMinItemLabelStyle  style ?
I want to display an icon in place of text .

- Cedric -
Sia
Telerik team
 answered on 03 Aug 2011
1 answer
322 views
I am using the MVVM pattern (with MVVM light) and have a Telerik TabControl bound to a collection of ViewModels like this:

<telerik:RadTabControl x:Name="tabs" telerik:Theming.Theme="Windows7" BackgroundVisibility="Collapsed" TabStripPlacement="Left" TabOrientation="Vertical" DisplayMemberPath="Name" IsContentPreserved="True"
                                           ItemsSource="{Binding ReviewViewModels, UpdateSourceTrigger=PropertyChanged}" ContentTemplateSelector="{StaticResource ReviewTemplateSelector}" Align="Right"
                                           ItemContainerStyle="{StaticResource ReviewCategoryTabStyle}" SelectedIndex="{Binding SelectedIndex}" />

The ReviewViewModels collection is an ObservableCollection<object> because I have one static tab along with any number (generally 2-3) of user-selected tabs based on items selected in another window. Since the ViewModels are drastically different I had to be as generic as possible for the root collection and then use a ContentTemplateSelector to show the appropriate content.

The issue I have is occasionally one of the tabs is duplicated, even though the underlying source doesn't reflect this. It's very intermittent, but I just happened to catch it on my screen while working on something with the app (Phase I is still in development) and the screen showed four tabs (one was a duplicate) and when I hit a button on the view to catch in a breakpoint I could see the underlying collection only contained three total items (which was expected). I can't seem to figure out where this other item is coming from as when data retrieval is complete for the tab content I explicitely instantiate the collection at that time and loop through to add the items like this:
Dispatcher.CurrentDispatcher.Invoke(DispatcherPriority.Send, new Action(() =>
            {
                this.ReviewViewModels = new ObservableRangeCollection<object>();
 
                //add the categories - this is the only place the items are added
                foreach (var cat in this.ReviewCategories)
                    this.ReviewViewModels.Add(new ReviewCategoryViewModel(cat));
 
                //add a new notes viewmodel
                this.ReviewViewModels.Add(new ReviewNotesViewModel());
 
                //collection size shows three entries (two ReviewCategoryViewModel and one ReviewNotesViewModel), tabs occasionally show four at this point
 
                this.SelectedIndex = 0;
 
                this.IsBusy = false;
            }));

Any suggestions on this as to where to even start looking? I am using Q2 2011.

Edit: It just happened again and the interesting thing is the fourth tab (the duplicate) is selected even though (as indicated above) I set the selected index to 0. I hit a button on the view that takes me to the VM and did a couple of screenshots showing the data is correct:

http://www.clearsolgroup.com/images/immediate-window.png (Immediate Window - shows three total ViewModels [expected] and SelectedIndex is 0)

http://www.clearsolgroup.com/images/duplicate-tab.png (UI of the duplicate tab, with the fourth being selected even though SelectedIndex is 0 and only three ViewModels exist).

Again, this is VERY interimmittent and reproducing it is intentionally possible. It just happens occasionally.
Vladislav
Telerik team
 answered on 03 Aug 2011
1 answer
143 views
Hi,

I am trying to do a ElementName binding in CellTemplate, however when I follow the solution on this page
http://www.telerik.com/help/wpf/gridview-troubleshooting-elementname-binding.html
The example code doesn't work. 

Can you take a look?

Ivan Ivanov
Telerik team
 answered on 03 Aug 2011
1 answer
148 views
Hi,

  Is it possible to use a spline line and a step line in a TimeBar.

Kind regards
Missing User
 answered on 03 Aug 2011
1 answer
61 views
Hi,

Reviewing the documentation and samples, I've noticed two different ways of associating a legend with a chart area. Given I have defined:

<telerik:ChartLegend x:Name="legend">

I can either associate with a chart area with LegendName:

<telerik:ChartArea LegendName="legend">

or bind it to the Legend property:

<telerik:ChartArea Legend="{Binding ElementName=legend}">

Which is the preferred way to associate a chart legend? Are there advantages/disadvantages with either way?

Kind regards,
Dave.
Peshito
Telerik team
 answered on 03 Aug 2011
3 answers
134 views

Hi,

I want to create special rows that have only one column (i.e. column span for a specific row).

So I created ControlTemplate with that single column, created a Style that change the template property to the new template and created RowStyleSelector that uses that template when needed. That worked but created a row that doesn't have the IndicatorPresenter at the start of the row.

You can see the picture.. 

Can I merge cells at the grid and stay with the default template?

Or how can I make sure that the IndicatorPresenter will appear with the same styles.

Vanya Pavlova
Telerik team
 answered on 03 Aug 2011
5 answers
294 views

I would like to generate the charts without actually showing it (in a WPF application), and then save them to image.

However, when I run, I hit  the InvalidOperationException

Sia
Telerik team
 answered on 03 Aug 2011
2 answers
180 views
Hi,

just was playing around with the new image editor. i'm using a custom ui like the one in the demo (the one with the image of the baseball player) and i was wondering if there is a way to set the height and width of the cropping rectangle to a specific size.i want to force the user to crop his images to a predifend size or at least aspect ratio. similar to the way you assign contact images on a iphone.

and one more question, how can a write the RadBitmap to a byte array for storing it in a DB?
UPDATE: OK, forget about the DB thing, just found the
Telerik.Windows.Media.Imaging.FormatProviders.BmpFormatProvider 

best regards
Michael
Mike
Top achievements
Rank 2
 answered on 03 Aug 2011
6 answers
221 views
Hi Telerik,

When using RadSchedueView, I'd like to use the predefined category list and assign a category to the appointment dynamically. This list is defined in RadScheduler. When I added these two references, it had name conflicts. How can I use this predefined list in ScheduleView?

Thanks.
Cheau
Supreet
Top achievements
Rank 1
 answered on 02 Aug 2011
2 answers
298 views
I am trying to make multiple changes to an observablecollection that is bound to a gridview.
Using linq to locate the items and then making changes.

It seems to work because I loop through in break mode and see it meeting the condition and setting the items Status value for the exact count of items that I am searching for, but I am not seeing changes reflect in gridview that has itemsource of the collection.

// grid.ItemSource = gridItemCollection (ObservableCollection<T>)
var itemsToUpdate = gridItemCollection.Where(item => item.Status.Equals(statusToChange));
foreach (var item in itemsToUpdate) item.Status = newStatus;

I assume since the collection is bound to the grid's ItemSource that it would update the grid automatically... does there need to be a manual update after the update takes place?

Is there a better approach for performance or clarity reasons?
Ivan Ivanov
Telerik team
 answered on 02 Aug 2011
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
LayoutControl
ProgressBar
Sparkline
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
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?