WPF slider預設的值為 Double 型別 要將值改成整數只需將屬性IsSnapToTickEnabled勾選起來即可 或是在xaml 給值 IsSnapToTickEnabled="True"