Telerik Forums
UI for WPF Forum
1 answer
136 views
hello, 
i am  trying to convert a silverlight DeepEarth project  over a geoserver into a WPF control. i have some problem trying to understand how the new WmsTiled Source work ( for example what kind of uri should i put in the string parameter?). Furthermore  i was able to connect to a GeoWebCache using this litlle class overriding  microsoft MapControl TileSource : 

public class GWCTileSource :  Microsoft.Maps.MapControl.TileSource
    {
        private const string TilePath = @"{GWC_ADDRESS}/service/gmaps?layers={L}&zoom={Z}&x={X}&y={Y}";
        private string gwc_address;
        private string layername;
 
         
        public GWCTileSource()
            : base()
        {
        }
 
        public GWCTileSource(string gwc_address, string layername)
            : base()
        {
             
            this.gwc_address = gwc_address;
            this.layername = layername;
             
        }
 
        public override Uri GetUri(int x, int y, int zoom)
        {
               string url = TilePath;
                url = url.Replace("{GWC_ADDRESS}", gwc_address);
                url = url.Replace("{L}", layername);
                url = url.Replace("{Z}", zoom.ToString());
                url = url.Replace("{X}", x.ToString());
                url = url.Replace("{Y}", y.ToString());
                return new Uri(url);
          
        }
    }

any advice on how should i proceed to manage both wms and wms through GeowebCache sources ?
Andrey
Telerik team
 answered on 09 May 2012
1 answer
333 views

We are currently developing a program using RadScheduleView. In our model any appointment can only be scheduled during user's working hours (which is user configurable).

 

Working hours can change from one day to another, and can be changed during program execution. We want it to be displayed behind other appointments (that is, in the background of RadScheduleView).

Is there an way to configure RadSchedule view background color in a cell independent way? i.e Working hours being displayed as green colored background cells while non working hours being displayed as gray colored cells, for example?

Thank you in advance,

Leandro

Dani
Telerik team
 answered on 09 May 2012
3 answers
399 views
Hi All,

I have a few classes that define the datacontext for controls in the RibbonView:

public class RibbonElement
{
    public string Text { get; set; }
    public bool IsEnabled { get; set; }
}
 
public class Tab : RibbonElement
{
    public ObservableCollection<Group> Groups { get; set; }
}
 
public class Group : RibbonElement
{
    public ObservableCollection<Button> Buttons { get; set; }
}
 
public class Button : RibbonElement
{
}

And I have several HierarchicalDataTemplates that define how the classes are visualized (modeled after the samples on this site):

    <DataTemplate x:Key="ButtonTemplate">
            <t:RadRibbonButton Text='{Binding Text}' IsEnabled='{Binding IsEnabled}' />
    </DataTemplate>
 
    <HierarchicalDataTemplate x:Key="GroupTemplate"
                              ItemsSource='{Binding Buttons}'
                              ItemTemplate='{StaticResource ButtonTemplate}'>
        <TextBlock Text='{Binding Text}' /> 
    </HierarchicalDataTemplate>
 
    <HierarchicalDataTemplate x:Key="TabTemplate"
                              ItemsSource='{Binding Groups}'
                              ItemTemplate='{StaticResource GroupTemplate}'>
        <TextBlock Text='{Binding Text}' />
    </HierarchicalDataTemplate>
</Window.Resources>
 
<t:RadRibbonView ItemsSource='{Binding Tabs}'
                 ItemTemplate='{StaticResource TabTemplate}'
                 ApplicationButtonVisibility="Hidden" />

How can I create the RadRibbonGroup/RadRibbonTab controls in the templates, instead of using a TextBlock?  I need to do this so that I can bind to IsEnabled to dynamically enable/disable groups.   The RadRibbonTab seems to take the output of the template and put it in the group header instead of the actual RadRibbonGroup control.   By contrast, the headered controls in the rest of WPF have HeaderTemplate property for headers and ItemTemplate property for items.


Tina Stancheva
Telerik team
 answered on 08 May 2012
5 answers
170 views
My company is currently looking at the possibility of combining the use of the Silverlight and the WPF RichTextBoxes (RTB).

On the client side we would have the Silverlight RTB.  It would send its XAML to the server to be saved into the database.

Then from a service the XAML would be loaded into a in-memory WPF RTB and then an image of the content would be generated.

My Question is, can the WPF RTB be used in a service that does not have an interface?  And if it can, Will I be able to create a RenderTargetBitmap of its visual?
David Hatfield
Top achievements
Rank 1
 answered on 08 May 2012
2 answers
118 views
Hi all,

how can i reach a 3D-Chart like the attached one. Thank You!
James
Top achievements
Rank 1
 answered on 08 May 2012
2 answers
108 views

 

I can't find how to make a 3D horizontal bar chart. Is there a series definition to do this? Or does anyone have instructions on how to make a Custom 3D model that can do this?

I'm using the document at

http://www.telerik.com/help/wpf/radchart-getting-started-create-data-bound-chart.html

to build a test application. I'm also using the code behind, so a piece of my code is:

{
[...]
 SeriesMapping seriesMapping = new SeriesMapping();
 seriesMapping.LegendLabel = "Product Sales";
 Bar3DSeriesDefinition def = new Bar3DSeriesDefinition();
 seriesMapping.SeriesDefinition = new Bar3DSeriesDefinition();//new HorizontalBarSeriesDefinition();//new SplineSeriesDefinition();
 seriesMapping.ItemMappings.Add(new ItemMapping("Month", DataPointMember.XValue));
 seriesMapping.ItemMappings.Add(new ItemMapping("Quantity", DataPointMember.YValue));
 seriesMapping.ItemMappings.Add(new ItemMapping("MonthName", DataPointMember.XCategory));
 radChart1.SeriesMappings.Add(seriesMapping);
 radChart1.ItemsSource = this.CreateData();
}

 
public class ProductSales
{
 public ProductSales(int quantity, int month, string monthName)
 {
  this.Quantity = quantity;
  this.Month = month;
  this.MonthName = monthName;
 }
 public int Quantity
 {
  get;
  set;
 }
 public int Month
 {
  get;
  set;
 }
 public string MonthName
 {
  get;
  set;
 }
}

private List<ProductSales> CreateData()
{
 List<ProductSales> persons = new List<ProductSales>();
 persons.Add(new ProductSales(154, 1, "January"));
 persons.Add(new ProductSales(138, 2, "February"));
 persons.Add(new ProductSales(143, 3, "March"));
 persons.Add(new ProductSales(120, 4, "April"));
 persons.Add(new ProductSales(135, 5, "May"));
 persons.Add(new ProductSales(125, 6, "June"));
 persons.Add(new ProductSales(179, 7, "July"));
 persons.Add(new ProductSales(170, 8, "August"));
 persons.Add(new ProductSales(198, 9, "September"));
 persons.Add(new ProductSales(187, 10, "October"));
 persons.Add(new ProductSales(193, 11, "November"));
 persons.Add(new ProductSales(212, 12, "December"));
 return persons;
}

thanks in advance

 

James
Top achievements
Rank 1
 answered on 08 May 2012
4 answers
119 views
I saw http://www.telerik.com/community/forums/wpf/chart/is-z-axis-supported-by-3d-chart.aspx some time ago, which implies that Z-Axis is not only supported, but used by default (at least for line series). However, I can not achieve this behavior using 3d bar charts. I have constructed a simple chart using multiple series, as indicated in the aforementioned post.  However, the bars from different series are drawn beside each other (instead of behind eachother), just as would be if the graph were 2d.

Is using the Z-Axis no longer the default behavior? How would I achieve an effect similar to what I've described? The files attached are the charts that currently get generated. Lines do draw on top of each other (desired), but bar charts draw beside each other (not desired).
James
Top achievements
Rank 1
 answered on 08 May 2012
5 answers
172 views
Hello!

We already set up a silverlight project using the DataServiceDataSource. But now, we have a project in WPF, and we are trying to implement the same scenario, but in this WPF project we are using Linq to SQL (.dbml) to generate the models.

This is a short description of the project structure:

APP (Views, ViewModels) WPF Application
Core(.dbml, partial classes, business logic etc) c# class library
Service(WCF for something that the project might have) WCF

My question is, with this architecture, how do i use the DataServiceDataSource? I realy need a service exposed to use it? it would be great if you explain it a little bit.

Looking forward to a answer.

Thanks
Missing User
 answered on 08 May 2012
2 answers
472 views
I have this defined to let each cell display it's value in a tooltip:
<Style TargetType="telerik:GridViewCell">
   <Setter Property="ToolTip" Value="{Binding Value,RelativeSource={RelativeSource Mode=Self}}" />
</Style>

It works, but for cells that have lots of content, it doesn't wrap the text. So I defined this ToolTipTemplate for the column that has lots of text:

<DataTemplate x:Key="GridViewToolTipTemplate">
   <TextBlock Text="{Binding Description, Converter={StaticResource LineBreaksConverter}}" TextWrapping="Wrap" MaxWidth="400" />
</DataTemplate>

The DataMemberBinding has the same expression as the Text of the Textblock, this just allows the text to wrap. It works well, but...

I'd like to reuse this template for another column, rather than having to define this template again. I'm just not sure what to bind the Text property to so that it works for whatever column I use it with.
Rayne
Top achievements
Rank 1
 answered on 08 May 2012
2 answers
155 views
Hi
 I would like to create a usercontrol that will allow me have a set a predefined columns within a GridView when bound to a collection of our DataContract classes.   What I would like to see is something on the order of the Data Template Selector... but instead, have that at the GridViewDataColumn level.   Here is an example

[DataContract]
public MyDataClass
{
Public SomeEnum EnumProperty {get;set;}
        Public SomeClass SomeClassProperty {get;set;}
Public int SomeIntProperty {get;set;}
}


Now  lets say I have a List<MyDataClass> and I want to bind this to a RadGridView control and have it auto generate the columns based on some defined logic. I know that I could probably do this in the Auto generate event handler in my code behind though a series of if logic or case staements.  But I would prefer it if there was a way that I can define some sort of a GridViewDataColumnSelector to have it automatically define both of the read only and editor templates. Something on the order of what we have for Data Template or Style Template selector except for the entire GridViewDataColumn.

For the example above.. I would like to auto-generate a Combobox for the Enum to provide a list of Enum possible values.  And for the SomeClass property.. I want to create a ComboBox with a list of values bound to collection of possible values. 
Michael C
Top achievements
Rank 1
 answered on 08 May 2012
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
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
Rob
Top achievements
Rank 3
Bronze
Bronze
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
Bronze
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?