wpf toolkit datetimepicker如何更改微调器的颜色

时间:2015-07-01 06:05:56

标签: wpf xaml wpftoolkit wpf-style

如何从xceed WPF Toolkit更改DateTimePicker的微调器箭头的颜色? 我找不到一个设置箭头颜色的属性 我是否需要覆盖整个ButtonSpinner才能这样做? 如果是,我怎么能这样做,我仍然是WPF的初学者,如果我只是尝试从ButtonSpinner reference page Visual Studio复制源代码抱怨主题

1 个答案:

答案 0 :(得分:1)

我已经编写了微调按钮样式,如下所示。你可以尝试一次。只需用背景颜色替换替换按钮内容模板填充属性

def html_home(fruit,size):
    htmlFile = open(fruit+".html","w")
    htmlFile.write("!DOCTYPE html>\n")
    htmlFile.write("<html>\n")
    htmlFile.write("<title> Fruitproperites </title>\n")
    htmlFile.write("<head>")
    htmlFile.write("<body>")
    htmlFile.write("<h1> List of fruitproperties </h1>\n")
    # By the time, I call html_home() function, there is already     
    # respective size.html page been created in each fruit/size folder.
    #  all have path as: scriptpath/fruit/size/size.html 
    scriptpath = os.path.dirname(os.path.abspath(__file__))
    htmlpath = os.path.join(scriptpath,target,size,size+".html")
    htmlFile.write('<a href = htmlpath> +size+ '</a>'<br><\n>')  
    htmlFile.write("</body>\n")
    htmlFile.write("</html>\n")
    htmlFile.close() 

    # Following code works fine 
    htmlFile = open('home.html','w')
    htmlFile.write("<!DOCTYPE html> \n")
    htmlFile.write("<html>\n")
    htmlFile.write("<head>\n")
    htmlFile.write("<title> Fruitproperties</title>\n")
    htmlFile.write("<body>\n")
    for fruit in fruits:
        htmlFile.write('<a href="'+fruit+'.html"> List of functions -'+target+'</a><br>\n')
    htmlFile.write("<body>\n")
    htmlFile.write("</html?\n")
    htmlFile.close()