Telerik Forums
UI for WPF Forum
1 answer
238 views
I'm trying to solve the following issue:

I load a cartographic image, jpg of size 9472x6656 px and it covers a geographical rectangle area of the following lat&long: 42, 12.3   41.17, 13.88 (decimal degrees)

I'm loading using directly XAML with the following code:


01.<telerik:RadMap Height="472" Margin="0,52,0,0" VerticalAlignment="Top" x:Name="RadMap1"
02.               ZoomLevel="14"
03.               MinZoomLevel="6"
04.               MaxZoomLevel="21"
05.               Center="41.92481708629, 12.5"
06.               NavigationVisibility="Visible"
07.                        Cursor="ScrollAll"
08.               ZoomBarVisibility="Visible"
09.               CommandBarVisibility="Visible">
10.           <telerik:RadMap.Provider>
11.               <telerik:UriImageProvider x:Name="UriImageProvider1" GeoBounds="42.0, 12.3, 41.17, 13.88" Uri="Maps/myMap_Z13.jpg" />
12.           </telerik:RadMap.Provider>
13.           <telerik:InformationLayer Name="informationLayer">
14.               <telerik:MapPinPoint Name="mapPinPoint" telerik:MapLayer.Location="41.92481708629, 12.5"
15.                               Text="Cavalcavia" Cursor="Hand"
16.                               ImageSource="Maps/icon01.png"  MouseLeftButtonDown="MapPinPoint_MouseLeftButtonDown" >
17.                   <telerik:MapLayer.HotSpot>
18.                       <telerik:HotSpot X="0.5" Y="0.5" />
19.                   </telerik:MapLayer.HotSpot>
20. 
21.               </telerik:MapPinPoint>
22.           </telerik:InformationLayer>
23.       </telerik:RadMap>


I'm trying to understand how coordinates and image size are releated.
It seems that the coordinates I set for the image provider (GeoBounds) are not right, and image is positioned somewhere else.

Which is the right way to position an image using UriImageProvider? There is no documentation online on that.
I've tried to following the suggestion in other post (http://www.telerik.com/forums/uriimageprovider-questions)
setting bounds with the following code, but I get only an error:

01.BitmapImage oImage = new BitmapImage(new Uri(System.AppDomain.CurrentDomain.BaseDirectory + "\\" + UriImageProvider1.Uri.OriginalString));
02. 
03.            Size geoSize = this.RadMap1.GetGeoSize(new Location(0, 0), new Size(oImage.PixelWidth / 10, oImage.PixelHeight / 10));
04.            LocationRect view = new LocationRect(new Location(0, 0), new Location(-geoSize.Height, geoSize.Width));
05. 
06.            view.MapControl = this.RadMap1;
07.            this.RadMap1.GeoBounds = view;
08.            this.RadMap1.MinZoomLevel = view.ZoomLevel;
09.            this.RadMap1.SetView(view);

as the view.ZoomLevel property get an impossible number, something like: 243578438.



Andrey
Telerik team
 answered on 02 Jun 2014
1 answer
64 views
how can i change the OpenCloseButtonStyle title, say from view galleries to somthing of my own?
Pavel R. Pavlov
Telerik team
 answered on 02 Jun 2014
3 answers
119 views
Normally filtering is done for event like LostFocus, pressing the enter button or selection change. How can I supress that behavior and trigger filtering later (also how?).
Pawel
Top achievements
Rank 1
 answered on 02 Jun 2014
1 answer
85 views
We are having a problem grouping objects in the RadGridView.
For example ,one of the properties of our objects is named:Changed.
When the application is loaded,the RadGridView and GridViewScrollbar behave well.
After grouping ,if the value of the property(Changed) changes in a specific object,then it should move to the appropriate group.
Unfortuntely,this does not happen.
To solve this bug ,we tried to manually sort oir regroup.
This solved the current bug,but created another bug.
The GridViewScrollbar of the grid moves up suddenly and does not stay in its original position.
The vertical offset =0.
In addition , when we return to the initial state (cancel the grouping ),the GridViewScrollbar still changes its position.
The objects in the items source update all the time.
In addition , we raise a property changed event on the collection bound to the item source.

How is this accomplished?

thanks in advance for your help.

public class MyDataContext
    {
        readonly string letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
        Random rnd ;

ObservableCollection<StockData> _source;
ObservableCollection<StockData> Source
        {
            get
            {
               if (_source == null)
                {
                       rnd=new Random();

                       _source = new ObservableCollection<StockData>(from i in Enumerable.Range(0, 20) select CreateStockData());

                       DispatcherTimer timer = new DispatcherTimer() 
                                   { 
                                         Interval = TimeSpan.FromSeconds(10),
                                          timer.Tick += new EventHandler(timer_Tick),
                                         timer.Start()
                                     };

                     return this.source;
            }
        }

        void timer_Tick(object sender,EventArgs e)
        { 
                switch(source [0].Change)
                {
                          case 0 :
                                source [0] .Change = 1 ;
                                 break;
                           case 1 :
                                 source [0] .Change = 0 ;
                                 break;
                 }
             SortCollection() ; 
        }

        private StockData CreateStockData()
        {
            StockData item = new StockData();
            item.Name = String.Format("{0}{1}{2}{3}", this.letters[this.rnd.Next(0, this.letters.Count())], this.letters[this.rnd.Next(0, this.letters.Count())],
                                                              this.letters[this.rnd.Next(0, this.letters.Count())], this.letters[this.rnd.Next(0, this.letters.Count())]);
            item.LastUpdate = DateTime.Now;
            item.Change = rnd.Next(0,2);
            return item;
        }

        QueryableCollectionView _data;
        public QueryableCollectionView Data
        {
            get
            {
                 if (this.data == null)
                {
                      _data = new QueryableCollectionView(Source);
                      _data.SortDescriptors.Add(new SortDescriptor()
                      {
                               Member = "Name",
                               SortDirection = System.ComponentModel.ListSortDirection.Descending
                      });

                    _data.SortDescriptors.Add(new SortDescriptor()
                   { 
                              Member = "Name",
                             SorttDirection = System.ComponentModel.ListSortDirection.Ascending
                   });
                }

               return _data;
            }
        }

        private void SortCollection()
        {
                   _data.SortDescriptors.Add(new SortDescriptor()
                         {
                               Member = "Name",
                               SortDirection = System.ComponentModel.ListSortDirection.Descending
                         });

                    _data.SortDescriptors.Add(new SortDescriptor()
                          { 
                              Member = "Name",
                             SorttDirection = System.ComponentModel.ListSortDirection.Ascending
                          });
        }  

    Public class StockData
    {
        public string Name{get;set;}
        public int Change{get;set;}
        public DateTime LastUpdate{get;set;}
     }
}
Dimitrina
Telerik team
 answered on 02 Jun 2014
1 answer
239 views
We are having grouping objects in the RadGridView.
For example ,one of the properties of our objects is named: Changed.
When the application is loaded, the RadGridView and the GridViewScrollbar behave well.
after grouping if the value of the property(Changed) changes in a specific object,then it should move to the appropriate group.
Unfortuntely,this does not happen.
To solve this bug ,we tried to manually sort or regroup.
This bug solved the currnt,but created another bug.
The GridViewScrollbar of the grid moves up suddenly and does not stay in its original position.
The vertical offset=0;
In addition , when we return to the initial state (cancel the grouping), the GridViewScrollbar still changes it's position.
The objects in the item source update all the time.
In addition ,we raise a property changed event on the collection bound to the item source .

How is this accomplished?
Thanks in advance for your help.
public class MyDataContext
    {
        readonly string letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
        Random rnd ;

ObservableCollection<StockData> _source;
ObservableCollection<StockData> Source
        {
            get
            {
               if (_source == null)
                {
                       rnd=new Random();

                       _source = new ObservableCollection<StockData>(from i in Enumerable.Range(0, 20) select CreateStockData());

                       DispatcherTimer timer = new DispatcherTimer() 
                                   { 
                                         Interval = TimeSpan.FromSeconds(10),
                                          timer.Tick += new EventHandler(timer_Tick),
                                         timer.Start()
                                     };

                     return this.source;
            }
        }

        void timer_Tick(object sender,EventArgs e)
        { 
                switch(source [0].Change)
                {
                          case 0 :
                                source [0] .Change = 1 ;
                                 break;
                           case 1 :
                                 source [0] .Change = 0 ;
                                 break;
                 }
             SortCollection() ; 
        }

        private StockData CreateStockData()
        {
            StockData item = new StockData();
            item.Name = String.Format("{0}{1}{2}{3}", this.letters[this.rnd.Next(0, this.letters.Count())], this.letters[this.rnd.Next(0, this.letters.Count())],
                                                              this.letters[this.rnd.Next(0, this.letters.Count())], this.letters[this.rnd.Next(0, this.letters.Count())]);
            item.LastUpdate = DateTime.Now;
            item.Change = rnd.Next(0,2);
            return item;
        }

        QueryableCollectionView _data;
        public QueryableCollectionView Data
        {
            get
            {
                 if (this.data == null)
                {
                      _data = new QueryableCollectionView(Source);
                      _data.SortDescriptors.Add(new SortDescriptor()
                      {
                               Member = "Name",
                               SortDirection = System.ComponentModel.ListSortDirection.Descending
                      });

                    _data.SortDescriptors.Add(new SortDescriptor()
                   { 
                              Member = "Name",
                             SorttDirection = System.ComponentModel.ListSortDirection.Ascending
                   });
                }

               return _data;
            }
        }

        private void SortCollection()
        {
                   _data.SortDescriptors.Add(new SortDescriptor()
                         {
                               Member = "Name",
                               SortDirection = System.ComponentModel.ListSortDirection.Descending
                         });

                    _data.SortDescriptors.Add(new SortDescriptor()
                          { 
                              Member = "Name",
                             SorttDirection = System.ComponentModel.ListSortDirection.Ascending
                          });
        }  

    Public class StockData
    {
        public string Name{get;set;}
        public int Change{get;set;}
        public DateTime LastUpdate{get;set;}
     }
}







Dimitrina
Telerik team
 answered on 02 Jun 2014
2 answers
254 views
Hi

we have a RadSlider with IsSelectionRangeEnabled=True, our requirement is that both Thumbs should push one another while dragging.

I would like that you confirm to me whether this is possible with the current RadSlider control. It seems that setting IsCoercionSuppressed to true or false does not yield our desired effect.

Regards
Abdelkarim
Abdelkarim
Top achievements
Rank 1
 answered on 31 May 2014
1 answer
266 views
I am looking at using the Telerik WPF 2014.1's Office 2013 implicit theme. How can I allow mixed-casing in the Header Captions instead of always having upper-cased text?

Kind Regards,
Albert
Vanya Pavlova
Telerik team
 answered on 31 May 2014
1 answer
193 views
Hi,

I'm trying to create a grid with only column group header but no individual column header.
I have added a picture to show what I'm trying to achieve. the + and - button are to add column.

I have created the grid and the column group headers but can't remove the individual column header.
Secondly can I set a minimum size for the column group header, so that if there are not enough column the header title is readable.

Any suggestions to solve my 2 issues would be greatly appreciated.

thanks
Boris
Telerik team
 answered on 31 May 2014
3 answers
381 views
I have a structure that I believe is not supported by Hierarchical Templates. If I'm wrong can someone show me how to bind this structure with templates.

ObservableCollection<AssessmentViewModel>

AssessmentViewModel.QuestionGroupViewModels<QuestionGroupViewModel>

QuestionGroupViewModel.QuestionViewModels<QuestionViewModel>

QuestionGroupViewModel.ChildQuestionGroupViewModels<QuestionGroupViewModel>

So each QuestionGroupViewModel can have a list of QuestionViewModels OR a list of ChildQuestionGroupViewModels and so on and so forth into infinity.

Is this possible with Hierarchical Templates or do I need to write code to do this.
Martin Ivanov
Telerik team
 answered on 31 May 2014
5 answers
481 views
As the title suggest I have the following treeview:

<telerik:RadTreeView  IsEditable="False"  ItemsSource="{Binding Items}" SelectedItem="{Binding SelectedItem, Mode=TwoWay}" IsLineEnabled="True" IsRootLinesEnabled="False" Background="White" telerik:AnimationManager.IsAnimationEnabled="False"  IsVirtualizing="False"  IsLoadOnDemandEnabled="False"  AutoScrollToSelectedItem="True"/>


Everything works as expected, except when the SelectedItem changes the tree won't expand to the level, unless that level has been navigated to previously, but the item itself still gets selected.

I was under the impression that by setting IsVirtualizing and IsLoadOnDemandEnabled to False would have cleared this issue, but no change in behavior was observed.
Martin Ivanov
Telerik team
 answered on 31 May 2014
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
SplashScreen
Rating
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
Cynthia
Top achievements
Rank 1
Iron
Jesse
Top achievements
Rank 2
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Jesse
Top achievements
Rank 2
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?