Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8279049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T09:12:38+00:00 2026-06-08T09:12:38+00:00

my Window has an array of double as a field : double[] sizes =

  • 0

my Window has an array of double as a field :

double[] sizes = new double[] {1.0, 2.0, 3.0, 4.0};

and also a combo box which I want it to have exact Items as the array above.
can anyone help me with xaml binding this array as a resource for the combo box?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T09:12:40+00:00Added an answer on June 8, 2026 at 9:12 am

    I don’t know what your code looks like but here’s an example of how to bind an array to a ComboBox

    <Window x:Class="WpfApplication1.MainWindow"
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            Title="MainWindow" Height="350" Width="525">
    <Grid>
        <ComboBox ItemsSource="{Binding Sizes}" />
    </Grid>
    </Window>
    

    Code behind:

    namespace WpfApplication1
    {
        /// <summary>
        /// Interaction logic for MainWindow.xaml
        /// </summary>
        public partial class MainWindow : Window
        {
            public double[] sizes = new double[] { 1.0, 2.0, 3.0, 4.0 };
            public double[] Sizes
            {
                get { return sizes; }
            }
    
            public MainWindow()
            {
                this.DataContext = this;   
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have an affliate window CSV which has nearly 1 lac rows, i want
I want to create an application which main window has canvas (or something where
I have the following set-up: A Window that has a splitView in which I
I have any array called query[] I am opening a new window with: window.open(http://localhost:8081/myapp/Query.action,mywindow,menubar=1,resizable=1,width=600,height=400);
I have two different styles for my window: Regular - window has title bar
I have an array of images, and two nib files. One nib file has
I have a javascript array containing the name and values of radios I want
I have a window opengl appcilation, where I use a multi array, and when
I have 2 Windows Forms. In first, the main window form, has multiline textbox
I have a javascript file which has some code somewhat like this: var Slide

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.