<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: RibbonButton side by side in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/ribbonbutton-side-by-side/m-p/5166439#M43234</link>
    <description>&lt;P&gt;Hey There,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I put them in columns of 3 in each columns, followed verically and not just side by side horizontaly?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry I have not understood completely above statement ,nonetheless I have arranged button in 4X4 pattern on panel in other words two rows and two columns of buttons.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do let me know if this doesn't help you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;[CommandMethod("SimpleButton")]
public void SimpleButton()
{
Autodesk.Windows.RibbonControl ribbonControl = Autodesk.Windows.ComponentManager.Ribbon;

RibbonTab Tab = new RibbonTab();
Tab.Title = "Test Ribbon";
Tab.Id = "TESTRIBBON_TAB_ID";

ribbonControl.Tabs.Add(Tab);

Autodesk.Windows.RibbonPanelSource srcPanel = new RibbonPanelSource();
srcPanel.Title = "Panel1";
srcPanel.Id = "PANEL_1_ID";

RibbonPanel Panel = new RibbonPanel();
Panel.Source = srcPanel;
Tab.Panels.Add(Panel);
/*Create Button 1*/
Autodesk.Windows.RibbonButton button1 = new RibbonButton();
button1.Text = "Button1";
button1.Size = RibbonItemSize.Large;
/*
Embedding Image resource to your project
1.On the Project menu, choose Add Existing Item.
2.Navigate to the image you want to add to your project. Click the Open button to add the image to your project's file list.
3.Right-click the image in your project's file list and choose Properties. The Properties window appears.
4.Find the Build Action property in the Properties window. Change its value to Embedded Resource.
*
Then opens a stream on the embedded image. The name used to refer to the image takes this form:
&amp;lt;namespace&amp;gt;.&amp;lt;image name&amp;gt;.&amp;lt;format&amp;gt;  */
button1.Image = LoadImage("TestSharp2015.Koala.jpg", 16, 16);
button1.LargeImage = LoadImage("TestSharp2015.Koala.jpg", 32, 32);
button1.ShowText = true;
                    
/*Create Button 2*/
            
Autodesk.Windows.RibbonButton button2 = new RibbonButton();
button2.Text = "Button2";
button2.ShowText = true;
button2.Image = LoadImage("TestSharp2015.Koala.jpg", 16, 16);
button2.LargeImage = LoadImage("TestSharp2015.Koala.jpg", 32, 32);
button2.Size = RibbonItemSize.Large;
Tab.IsActive = true;

/*Create Button 3*/
Autodesk.Windows.RibbonButton button3 = new RibbonButton();
button3.Text = "Button3";
button3.ShowText = true;
button3.Image = LoadImage("TestSharp2015.Koala.jpg", 16, 16);
button3.LargeImage = LoadImage("TestSharp2015.Koala.jpg", 32, 32);
button3.Size = RibbonItemSize.Large;
Tab.IsActive = true;

/*Create Button 4*/
Autodesk.Windows.RibbonButton button4 = new RibbonButton();
button4.Text = "Button4";
button4.ShowText = true;
button4.Image = LoadImage("TestSharp2015.Koala.jpg", 16, 16);
button4.LargeImage = LoadImage("TestSharp2015.Koala.jpg", 32, 32);
button4.Size = RibbonItemSize.Large;
Tab.IsActive = true;

Autodesk.Windows.RibbonRowPanel ribRowPanel1 = new RibbonRowPanel();
ribRowPanel1.Items.Add(button1);
ribRowPanel1.Items.Add(new RibbonRowBreak());
ribRowPanel1.Items.Add(button2);
srcPanel.Items.Add(ribRowPanel1);
RibbonSeparator rsP = new RibbonSeparator();
rsP.SeparatorStyle = RibbonSeparatorStyle.Invisible;
srcPanel.Items.Add(rsP);
Autodesk.Windows.RibbonRowPanel ribRowPanel2 = new RibbonRowPanel();
ribRowPanel2.Items.Add(button3);
ribRowPanel2.Items.Add(new RibbonRowBreak());
ribRowPanel2.Items.Add(button4);
srcPanel.Items.Add(ribRowPanel2);
                      
}

public BitmapImage LoadImage(string imageName, int Height, int Width)
{
BitmapImage image = new BitmapImage();

image.BeginInit();
image.StreamSource = Assembly.GetExecutingAssembly().GetManifestResourceStream(imageName);
// image.UriSource = new Uri(imageName);
image.DecodePixelHeight = Height;
image.DecodePixelWidth = Width;
image.EndInit();
return image;
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 22 Jul 2014 11:48:05 GMT</pubDate>
    <dc:creator>moogalm</dc:creator>
    <dc:date>2014-07-22T11:48:05Z</dc:date>
    <item>
      <title>RibbonButton side by side</title>
      <link>https://forums.autodesk.com/t5/net-forum/ribbonbutton-side-by-side/m-p/5163009#M43233</link>
      <description>&lt;P&gt;I have the following code to create an RibbonButton.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This way buttons appeats side by side.&lt;/P&gt;&lt;P&gt;How can I put them in columns of 3 in each columns, followed verically and not just side by side horizontaly?&lt;/P&gt;&lt;PRE&gt;Autodesk.Windows.RibbonButton button = new RibbonButton();
button.Text = displayName;
button.Size = ribbonItemSize;
button.Orientation = System.Windows.Controls.Orientation.Horizontal;
button.Image = getBitmap(standardBitmap, 16, 16);
button.LargeImage = getBitmap(largeBitmap, 32, 32);
button.ShowText = showText;
button.CommandParameter = commandParameter;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Rui&lt;/P&gt;</description>
      <pubDate>Sun, 20 Jul 2014 13:46:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/ribbonbutton-side-by-side/m-p/5163009#M43233</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-07-20T13:46:59Z</dc:date>
    </item>
    <item>
      <title>Re: RibbonButton side by side</title>
      <link>https://forums.autodesk.com/t5/net-forum/ribbonbutton-side-by-side/m-p/5166439#M43234</link>
      <description>&lt;P&gt;Hey There,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I put them in columns of 3 in each columns, followed verically and not just side by side horizontaly?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry I have not understood completely above statement ,nonetheless I have arranged button in 4X4 pattern on panel in other words two rows and two columns of buttons.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do let me know if this doesn't help you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;[CommandMethod("SimpleButton")]
public void SimpleButton()
{
Autodesk.Windows.RibbonControl ribbonControl = Autodesk.Windows.ComponentManager.Ribbon;

RibbonTab Tab = new RibbonTab();
Tab.Title = "Test Ribbon";
Tab.Id = "TESTRIBBON_TAB_ID";

ribbonControl.Tabs.Add(Tab);

Autodesk.Windows.RibbonPanelSource srcPanel = new RibbonPanelSource();
srcPanel.Title = "Panel1";
srcPanel.Id = "PANEL_1_ID";

RibbonPanel Panel = new RibbonPanel();
Panel.Source = srcPanel;
Tab.Panels.Add(Panel);
/*Create Button 1*/
Autodesk.Windows.RibbonButton button1 = new RibbonButton();
button1.Text = "Button1";
button1.Size = RibbonItemSize.Large;
/*
Embedding Image resource to your project
1.On the Project menu, choose Add Existing Item.
2.Navigate to the image you want to add to your project. Click the Open button to add the image to your project's file list.
3.Right-click the image in your project's file list and choose Properties. The Properties window appears.
4.Find the Build Action property in the Properties window. Change its value to Embedded Resource.
*
Then opens a stream on the embedded image. The name used to refer to the image takes this form:
&amp;lt;namespace&amp;gt;.&amp;lt;image name&amp;gt;.&amp;lt;format&amp;gt;  */
button1.Image = LoadImage("TestSharp2015.Koala.jpg", 16, 16);
button1.LargeImage = LoadImage("TestSharp2015.Koala.jpg", 32, 32);
button1.ShowText = true;
                    
/*Create Button 2*/
            
Autodesk.Windows.RibbonButton button2 = new RibbonButton();
button2.Text = "Button2";
button2.ShowText = true;
button2.Image = LoadImage("TestSharp2015.Koala.jpg", 16, 16);
button2.LargeImage = LoadImage("TestSharp2015.Koala.jpg", 32, 32);
button2.Size = RibbonItemSize.Large;
Tab.IsActive = true;

/*Create Button 3*/
Autodesk.Windows.RibbonButton button3 = new RibbonButton();
button3.Text = "Button3";
button3.ShowText = true;
button3.Image = LoadImage("TestSharp2015.Koala.jpg", 16, 16);
button3.LargeImage = LoadImage("TestSharp2015.Koala.jpg", 32, 32);
button3.Size = RibbonItemSize.Large;
Tab.IsActive = true;

/*Create Button 4*/
Autodesk.Windows.RibbonButton button4 = new RibbonButton();
button4.Text = "Button4";
button4.ShowText = true;
button4.Image = LoadImage("TestSharp2015.Koala.jpg", 16, 16);
button4.LargeImage = LoadImage("TestSharp2015.Koala.jpg", 32, 32);
button4.Size = RibbonItemSize.Large;
Tab.IsActive = true;

Autodesk.Windows.RibbonRowPanel ribRowPanel1 = new RibbonRowPanel();
ribRowPanel1.Items.Add(button1);
ribRowPanel1.Items.Add(new RibbonRowBreak());
ribRowPanel1.Items.Add(button2);
srcPanel.Items.Add(ribRowPanel1);
RibbonSeparator rsP = new RibbonSeparator();
rsP.SeparatorStyle = RibbonSeparatorStyle.Invisible;
srcPanel.Items.Add(rsP);
Autodesk.Windows.RibbonRowPanel ribRowPanel2 = new RibbonRowPanel();
ribRowPanel2.Items.Add(button3);
ribRowPanel2.Items.Add(new RibbonRowBreak());
ribRowPanel2.Items.Add(button4);
srcPanel.Items.Add(ribRowPanel2);
                      
}

public BitmapImage LoadImage(string imageName, int Height, int Width)
{
BitmapImage image = new BitmapImage();

image.BeginInit();
image.StreamSource = Assembly.GetExecutingAssembly().GetManifestResourceStream(imageName);
// image.UriSource = new Uri(imageName);
image.DecodePixelHeight = Height;
image.DecodePixelWidth = Width;
image.EndInit();
return image;
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jul 2014 11:48:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/ribbonbutton-side-by-side/m-p/5166439#M43234</guid>
      <dc:creator>moogalm</dc:creator>
      <dc:date>2014-07-22T11:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: RibbonButton side by side</title>
      <link>https://forums.autodesk.com/t5/net-forum/ribbonbutton-side-by-side/m-p/5167159#M43235</link>
      <description>Great!! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;I was missing the "new RibbonRowBreak()"&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Tue, 22 Jul 2014 15:31:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/ribbonbutton-side-by-side/m-p/5167159#M43235</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-07-22T15:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: RibbonButton side by side</title>
      <link>https://forums.autodesk.com/t5/net-forum/ribbonbutton-side-by-side/m-p/5628884#M43236</link>
      <description>&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you send the code for .Net.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am finding it difficult to add image to the button, please see the below. I am missing any reference ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;button1.Image = LoadImage("TestSharp2015.Koala.jpg", 16, 16)  - This command is not working with me&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;' Creating Ribbon Control&lt;BR /&gt;Dim AcadRibbonControl As RibbonControl = New RibbonControl&lt;/P&gt;&lt;P&gt;' Creating Tab&lt;BR /&gt;Dim AcadRibbonTab As RibbonTab = New RibbonTab&lt;BR /&gt;AcadRibbonTab.Title = "Crane Tab"&lt;BR /&gt;AcadRibbonTab.Id = "CraneTab"&lt;BR /&gt;AcadRibbonTab.IsContextualTab = False&lt;/P&gt;&lt;P&gt;' Add Tab to Ribbon Control&lt;BR /&gt;AcadRibbonControl.Tabs.Add(AcadRibbonTab)&lt;/P&gt;&lt;P&gt;' Creating Ribbon Panel Source in to which place Ribbon Items&lt;BR /&gt;Dim AcadRibbonPanelSource As RibbonPanelSource = New RibbonPanelSource&lt;BR /&gt;AcadRibbonPanelSource.Title = "Crane Planner"&lt;BR /&gt;AcadRibbonPanelSource.Id = "CranePlanner"&lt;BR /&gt;'AcadRibbonPanelSource.Items.Add(AcadRibbonRow)&lt;/P&gt;&lt;P&gt;' Creating Ribbon Panel&lt;BR /&gt;Dim AcadRibbonPanel As RibbonPanel = New RibbonPanel&lt;BR /&gt;AcadRibbonPanel.Source = AcadRibbonPanelSource&lt;/P&gt;&lt;P&gt;' Add Ribbon Panel to the Ribbon Tab&lt;BR /&gt;AcadRibbonTab.Panels.Add(AcadRibbonPanel)&lt;/P&gt;&lt;P&gt;' Creating a Button&lt;BR /&gt;Dim AcadButton As RibbonButton = New RibbonButton&lt;BR /&gt;AcadButton.Text = "Crane Form"&lt;BR /&gt;AcadButton.Orientation = Windows.Controls.Orientation.Vertical&lt;BR /&gt;AcadButton.Size = RibbonItemSize.Large&lt;BR /&gt;AcadButton.ShowImage = True&lt;BR /&gt;AcadButton.ShowText = True&lt;/P&gt;&lt;P&gt;'Embedding Image resource to your project&lt;BR /&gt;'1.On the Project menu, choose Add Existing Item.&lt;BR /&gt;'2.Navigate to the image you want to add to your project. Click the Open button to add the image to your project's file list.&lt;BR /&gt;'3.Right-click the image in your project's file list and choose Properties. The Properties window appears.&lt;BR /&gt;'4.Find the Build Action property in the Properties window. Change its value to Embedded Resource.&lt;/P&gt;&lt;P&gt;' Assiging Image to Button&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;AcadRibbonTab.IsActive = True&lt;/P&gt;&lt;P&gt;' Create a Row to add Ribbon Button&lt;BR /&gt;Dim AcadRibbonRow As RibbonRowPanel = New RibbonRowPanel&lt;BR /&gt;AcadRibbonRow.Items.Add(AcadButton)&lt;BR /&gt;'AcadRibbonTab.Panels.Add(AcadRibbonPanel)&lt;BR /&gt;AcadRibbonPanelSource.Items.Add(AcadRibbonRow)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 15px;"&gt;Catch ex As System.Exception&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;MsgBox(ex.Message, MsgBoxStyle.Critical, "Error")&lt;BR /&gt;End Try&lt;/P&gt;</description>
      <pubDate>Sun, 10 May 2015 18:18:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/ribbonbutton-side-by-side/m-p/5628884#M43236</guid>
      <dc:creator>srikanthc85</dc:creator>
      <dc:date>2015-05-10T18:18:47Z</dc:date>
    </item>
    <item>
      <title>Re: RibbonButton side by side</title>
      <link>https://forums.autodesk.com/t5/net-forum/ribbonbutton-side-by-side/m-p/5629291#M43237</link>
      <description>&lt;P&gt;Take a look in&amp;nbsp;the following code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;public&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;static&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;RibbonButton&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; CreateButton(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;string&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; displayName, &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;RibbonItemSize&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; ribbonItemSize, &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;Bitmap&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; standardBitmap, &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;Bitmap&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; largeBitmap,&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;bool&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; showText, &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;string&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; commandParameter)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;Autodesk.Windows.&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;RibbonButton&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; button = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;new&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;RibbonButton&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;();&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;button.Text = displayName;&lt;/P&gt;&lt;P&gt;button.Size = ribbonItemSize;&lt;/P&gt;&lt;P&gt;button.Orientation = System.Windows.Controls.&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;Orientation&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;.Horizontal;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;if&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; (standardBitmap != &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;null&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;button.Image = getBitmap(standardBitmap, 16, 16);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;if&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; (largeBitmap != &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;null&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;button.LargeImage = getBitmap(largeBitmap, 32, 32);&lt;/P&gt;&lt;P&gt;button.ShowText = showText;&lt;/P&gt;&lt;P&gt;button.CommandParameter = commandParameter;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;return&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; button;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;static&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;BitmapImage&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; getBitmap(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;Bitmap&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; bitmap, &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;int&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; height, &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;int&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; width)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;MemoryStream&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; stream = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;new&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;MemoryStream&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;();&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;bitmap.Save(stream, System.Drawing.Imaging.&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;ImageFormat&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;.Png);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;BitmapImage&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; bmp = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;new&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;BitmapImage&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;();&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;bmp.BeginInit();&lt;/P&gt;&lt;P&gt;bmp.StreamSource =&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;new&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;MemoryStream&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;(stream.ToArray());&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;bmp.DecodePixelHeight = height;&lt;/P&gt;&lt;P&gt;bmp.DecodePixelWidth = width;&lt;/P&gt;&lt;P&gt;bmp.EndInit();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;return&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; bmp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2015 09:01:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/ribbonbutton-side-by-side/m-p/5629291#M43237</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-05-11T09:01:15Z</dc:date>
    </item>
  </channel>
</rss>

