Could use help getting started with trial

6 posts, 0 answers
  1. Jeff
    Jeff avatar
    4 posts
    Member since:
    Dec 2011

    Posted 31 Dec 2011 Link to this post

    Using VS Express 2010, Win 7 w/.Net 4 and .Net EF 4.1.   So far, to add controls, I have to go to toolbox and manual add each Telerik control I want to use.   That's okay if this is the way I have to do it.   Eventually, I will get all the ones I want to play with.

    I am trying to find my way around.   One simple task is I would like to create oval-shaped buttons.   I can go into the root properties and dig around until I find that I can select an ellipse shape, and it even appears like an ellipse in my designer.   But when I debug, it totally ignores my shape selection.  I also tried changing background color, but it totally ignores that, as well.   Of course, I can do all the regular C# things, such as make the button bigger or smaller, or change its text.   But I can't seem to "Telerik" it.

    I am using a straight-forward Windows Form.

    Telerik looks promising, but I'd sure like to be able to kick the tires as much as possible before my trial runs out.....

    Thanks.

    EDIT:   I see that disabling theming allowed it to recognize the background color I picked.   That issue is solved.   Now, how about getting my ellipse shape to render at runtime?
  2. Jeff
    Jeff avatar
    4 posts
    Member since:
    Dec 2011

    Posted 31 Dec 2011 Link to this post

    In the designer.cs, I did not see anything where it was setting my button to shape=ellipse.   So, I added this:

     this.radButton1.RootElement.Shape = new Telerik.WinControls.EllipseShape();
              
    Now, it renders an ellipse at runtime with fragments of a rectangular border still left.   I also added a duplicate of this line to a mousehover event over the button, and when I hover, the rectangular border remnants disappear.

    So, why was there no reference to shape in my designer.cs file?   Also, how do I make it run right the first time (so that the border remnants are gone)?
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Ivan Petrov
    Admin
    Ivan Petrov avatar
    701 posts

    Posted 04 Jan 2012 Link to this post

    Hi Jeff,

    Thank you for writing.

    Since you are new to the RadControls for WinForms I would suggest you familiarize yourself with how the controls are structured and how they work. You can find information on this topic in our product documentation

    All controls are build of different elements. In the case of RadButton, there is a main RadButtonElement and it contains a FillPrimitive, BorderPrimitive, TextPrimitive and an ImagePrimitive. To apply a shape to a button, the best approach is to apply a shape to the main element. The main purpose of the controls is to transfer events and properties of the elements to be used in the VS designer. You can try using this line of code which would make the button with an oval shape along with it's border and fill:
    this.radButton1.ButtonElement.Shape = new EllipseShape();

     Another way to change the look of a control is through our theming mechanism. This is also the recommended way of style the RadControls for WinForms. To learn more about styling you can read the help article on - Visual Style Builder. In the article you will also find links to tutorial videos on how the style a control.

    I hope this will be useful for you. If you have further questions do not hesitate to ask.

    Kind regards,
    Ivan Petrov
    the Telerik teamSP1 of Q3’11 of RadControls for WinForms is available for download (see what's new).
  5. Jeff
    Jeff avatar
    4 posts
    Member since:
    Dec 2011

    Posted 04 Jan 2012 Link to this post

    Thanks, Ivan.  

    I have since found the documentation, particularly the sections that list the various methods and properties available for the controls.  Let's take the RadButton API Reference:   http://www.telerik.com/help/winforms/allmembers_t_telerik_wincontrols_ui_radbutton.html

    Here is what it says about the ButtonElement property:

    "Gets the instance of RadButtonElement wrapped by this control. RadButtonElement is the main element in the hierarchy tree and encapsulates the actual functionality of RadButton."  (This is nice and short, but almost as vague as can be when you can see all sorts of functionality that exists parallel to the ButtonElement property).

    The API Reference is also showing all sorts of properties of equal hierarchy with ButtonElement, like Top, Bottom, Size, Style, and on and on......  The write-up on ButtonElement says ButtonElement "encapsulates the actual functionality."  If Shape is a functionality, I would think Size and Style would be, too, yet Size and Style are not buried beneath ButtonElement like Shape is.   Basically, I am having an issue getting a grip on the organizational structures and am finding myself quite lost trying to navigate through them.

    So, not really understanding this, I am sure I will try to extend by analogy the example you gave and start keeping an eye out for  radScheduler.SchedulerElement and radOtherControls.OtherControlsElement.

    Exposing the logical pattern would help a newbie get around more efficiently, or at least it would help me  ;-)

    Is there anything in the documentation that would help me get my hands around this?   My issue appears not so much to be a programming one, but rather not understanding the organizational structure of the elements and the patterning that is likely largely repeated from one to the next type of control.

    Thanks.

    (P.S., Sorry if I am dense-sounding).   The idea is I am not the "programmer" on our project, although I know a lot about what programmers do and how they go about it.  I am wanting to evaluate Telerik, and if I can get acquainted with its controls' methods and properties, I'll be able to know what we can and cannot do with it.  




    .
  6. Jeff
    Jeff avatar
    4 posts
    Member since:
    Dec 2011

    Posted 04 Jan 2012 Link to this post

    To better describe what I am trying to do, I am the guy who has hired a programmer.   I have to explain to him the desired business logic, which is unique to our business.   Native C# would require too much coding to go where we want.   Your library seems to have a more robust set of properties and methods that will allow us to get there much more quickly.   If I can become familiar with the structuring of the properties, I can discern WHERE we can implement some features of our business logic.  The programmer can surely take it from there.  Neither of us have used Telerik before.  At this early stage, there may be many ways to accomplish the logic, I am sure.  However, if we have a decent familiarity with your control structures, this will likely lead us to choosing the most efficient way first,
  7. Ivan Petrov
    Admin
    Ivan Petrov avatar
    701 posts

    Posted 06 Jan 2012 Link to this post

    Hello Jeff,

    Thank you for writing back.

    We cannot provide you with much more information than what is available in our online documentation. You can refer to it for better understanding of our controls structure and way of work. The basic topic you have to be familiar with is the Telerik Presentation Framework on which our controls are build. In its article and its sub-articles you will find examples and explanations on how to build a control, what elements are used for what purposes, layout mechanism, events etc.

    It is also a good idea to have the developer look at these as experience in .NET Development would make the articles much easier to assimilate and understand.

    I hope you will find these articles explanatory and you will get an idea of how the controls work.

    Regards,
    Ivan Petrov
    the Telerik team

    SP1
    of Q3’11 of RadControls for WinForms is available for download (see what's new).
Back to Top
UI for WinForms is Visual Studio 2017 Ready